As mentioned over and over and over this is not a Problem we can just fix this has been a thing with the catch trainer's pokemon for well over 15 years. It's just the way the game is coded and how it indexes the pokemon in the battle at all
Oh, thanks @SkyQueen. Anyway, steal pokemon is bad don't do that