Hey, so ive been having this problem today which is after a pokemon of mine faints i try to swap pokemons and then he becomes my enemy , its really annoying that this happens everytime any of my pokemons faints and ive tried reinstalling the game, same problem..
i recorded a video to explain it https://streamable.com/gavcc8