Yes, assaulting, harassing, and interfering with police often leads to unwanted consequences.
Leave police alone, and you are more likely to be struck by lightening than to be pepper sprayed and arrested by them.
If police are wrong, and accost you when you are completely innocent, comply with their orders anyway, and see them in court.
I taught my children that, because I'd rather they ride in a police car unfairly, than to be pepper sprayed and then still ride in a police car when they brought it on themselves.
If Alex Pretti had social distanced from those police officers, he would have lived to protest again, as long as the money held out.