Could you upload examples of the savefiles, specifically the unmodified savefile, and again after opening it and saving in PKHeX?
Recording a short video clip showing the process from start to finish could also help identify any mistakes you're making along the way that's causing the corruption, if any.
It's hard to know what's happening without being able to see the steps you're taking, or having the files for comparison.