This does not sound like a problem caused by PKHeX. It's either your ROM that got corrupted or some faulty emulator settings.
Things you can try:
if you have cheats active, remove or disable all of them
delete your emulator settings (should be desmume.ini, or something like that)
delete and redownload the latest version of the emulator and all of its files
redump your game
try melonDS instead https://github.com/melonDS-emu/melonDS/releases/latest
The Pokémon has a move that cannot be used in that game. (presumably this is Sword and Shield)
Pokémon transferred up to SWSH retain their older moves, but not every move is usable. This is normal.
Just take the one from here
It’s one officially received and went through HOME properly. If it still flags then wait for PKHeX to fully support transfers
Well original magearna is a special case since it's generated in Home.
But anyways, the latest official build of pkhex gives these problems, however if you switch to a Dev build, Original Magearna doesn't show these errors and shows it as legal again.