How about don’t add impossible species, or stuff with illegal moves. In general, no illegals.
In this case, it doesn’t matter whether in console or on emulator. A save is a save, and PKHeX reads it as such, and writes as such. The limitations to what you can add applies to both. This already sounds like a “you” problem.
My suggestion is to not make stuff from scratch, and use the programmed encounter database.
Anyhow, it’s only an issue when unedited mons or absolutely perfect legal mons for that game turn into Eggs..