I heard due to the chip tech used on these things (and Switch games as well) if theyre not periodically powered up in a console, these chips can degrade over time, not the same as a battery, but due to a lack of voltage in the chips they can essentially bit swap if I remember correctly, as they're essentially rewriteable NAND, rather than ROM chips. The chips refresh themselves periodically/error correctly, when powered up and there are ways to sometimes restore a game using 3rd party tools, but not something everyone, even someone tech savvy, will always have access to.
I was planning to go through and open up all the games ive got sooner or later (as realistically even the sealed ones we got to play), and leave them running for 5 or so minutes each and just check theyre all fine.
That's going to happen rather naturally with the Switch games now Im wanting to play everything on Switch 2, but the 3DS doesnt get played as often (and when it does sometimes im using DS games or my R4) and dont want to leave it a few years and find some of the older cartridges have died due to lack of power up.
Sounds like maybe that is what has happened to your Pokemon