But this is frequently done when curfews are enacted. They are put in place and limit civil rights of everyone to control a few bad people.
Edit for clarification: It is not my duty to surrender my rights and accept collective guilt for another's crimes in order to make things easier on government agents.
That’s like saying “I’m not part of this lynch mob, I was just standing next to the tree protesting peacefully. Innocent until proven guilty.”
For me, if I’m protesting peacefully and 20% of the crowd starts smashing stuff or burning cars, I’m going to split and disavow them.
This isn’t your neighbor who lives next to you that you can’t do anything about.
In my city, a peaceful protest turned violent and started smashing stuff. I’m not sure how I avoid that if I was trying to peacefully protest.