It's not the emulator. I started getting this same issue after I upgraded to the newest version of PKHeX. Whenever I save in PKHeX, the file size of .DSV files increases from 513kb to 1mb. When I load the exact same .DSV file it gives me the error "Invalid save file loaded. Aborting.". I've managed to fix the issue myself but making any changes in PKHeX then saving increases the file size again. The workaround I'm currently using is to load the .DSV in DeSmuME, export the save as a .SAV file, load that up in MelonDS, import the .SAV file, then go back into DeSmuMe and import the .SAV now the size is back down to 513kb. Like I said though, if I open that "fixed" file back up and save in PKHeX, it breaks it again. PKHeX has a new issue with .DSV files.