That seems so very one sided reasoning when the same logic is not applied to the rest of us. When we interact with police, they get to break the law but we must perfectly follow the law or face charges. There is no equality in that arrangement.
But the flip side is also true. Just as a doctor can absolutely be arrested for intentionally harming a patient, a police officer who arrests you for clearly wrong reasons should absolutely be sued or prosecuted for their crime. But describing the line between those two cases is hard.
When a police officer arrests you, they are doing something to you that in any other situation would be a major crime and it is not done in your best interest. This significantly changes the reasoning and, especially in light of recent events, needs a significant improvement in how it is currently legally treated.