Also having this issue after the 2022.6 game maker update
Viewing post in YYPMaker erroneously trashing .yy files
I wrote a really shoddy Python script (I have very little experience with Python) to temporarily alleviate the issue. Just place it in your project directory and then run it before running YYPM. It'll rename every .yy file to match its respective directory so that YYPM doesn't trash it.
It'll also say that some assets are missing when you open the project again (or I'm fairly certain, just when you reload the .yyp while the project is still open), but that is just a false negative.
(Also don't mind the name of that repo, I just didn't want to figure out where else to upload this)