PKHeX is a save editor, not a ROM editor. Randomized games are from edited ROMs, not edited saves.
Additionally, PKHeX typically only works properly with mainline saves, not saves from ROM edited games.
If PKHeX opens the save, you *could* use batch editor to edit the mons (and ignore the illegal status). Alternatively try launching the app in Hax mode.