Punycode normalizes the case and other Unicode stuffs with the PRECIS Framework [1] before the label ever gets encoded to an ASCII-Compatible Encoding---those get prefixed with `xn--`. The root zone and top-level domains have an additional set of script-specific restrictions as well (RZ-LGR [2] in particular).
[1] https://datatracker.ietf.org/doc/html/rfc7564
[2] https://www.icann.org/resources/pages/root-zone-lgr-2015-06-...