Batter a cop? You’re probably going for a ride even if you were at a protest, which seems fairly reasonable.
Part of the issue is that folks are protesting the police themselves - namely, the systematic and blatant racism and police violence. The prudent measure, minimally, would be to have a background presence since they've not actually jumped on the chance to make real change. The Rodney King riots happened in 1992: We've had decades to try to change the face of policing. If anything, perhaps we should have started real change after any one of the incidences. Changed police immunity. Required more training. Try to reduce officer stress and weed out folks that were racist. Abolish police gangs. But that's much harder, and won't stop a protest while it is happening.
But it would actually stop them.
Have you not paid attention to any protest in the US whatsoever in the past 10-15 years? It's VERY easy to get thrown in jail, even when judges have ruled mere months before that it's illegal for police to keep arresting protesters.