If I am not terribly mistaken —it's been a while since I last used XAMPP— I seem to recall that Apache on XAMPP has a conflict with Joomla 4's pre-compressed JS and CSS files. It does not return the correct headers, causing the pre-compressed files to be re-compressed which, of course, breaks them. When you set Debug Site to Yes you are also telling Joomla to use the non-minified, non-pre-compressed versions of the core CSS and JS files which would explain why that works.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!