This glitch/Error is one that isn’t commonly talked about, mainly because it’s not really a bad thing. It occurs when you get killed in a raid and you’re Pokémon vanishes. It’s now invisible.
In this invisible state, your Pokémon is now immortal and is free to attack and dodge as much as it wants. The downside: when the raid boss uses its charge attack the ‘immortal’ Pokémon is killed and your next Pokémon takes on all the damage of the charge attack.
There is no way to fix this glitch, but it’s not really that bad. I’ve noticed it occurs in a few groups of Pokémon:
2000-3000CP Pokemon (in that CP range)
I don’t know why these groups though. anyways, I just wanted to report on this one since i’ve experienced it nearly every Raid for months now.