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.