So I've been noticing this issue with my Pokémon GO Pokémon once I transfer them to HOME and into my Sword game. This seems to only happen with raid Pokémon, as well. An example will be this unedited Palkia I transferred in (it has also occurred with a Dialga and a shiny Lapras). I'm using the latest version of PKHeX (20210521 as far as I can tell after double-checking), and I haven't made any changes at all to this Palkia since I transferred it (same with the Dialga and Lapras). I think this is a bug, since it doesn't occur with other Pokémon from GO, only ones from gym raids.
In either case, is there possibly a way to force the legality check? If not, would these still be safe to use online? I transferred them in for the explicit purpose of using them for competitive sets. I've attached a screenshot along with the Palkia's file if those help. Thanks for the help, and let me know if you need anymore information!
484 - Palkia - E38DCE93290A.pk8