You wouldn't even need to shoot, just have strategically placed speakers play gunshot sounds.
Or clap really loud.
Something to keep in mind at any time: unarmed does not neccessarily mean harmless.
Wasn't Kenosha the place where the cops shot a guy who refused to cooperate and tried to get into an SUV before they shot his ass up?
If so, unarmed really doesn't equal harmless, since you can do a lot of harm with an SUV on a rampage.
That is a uniform: something that lets people know who is on their side, which is all the practicality anyone needs in a high-chaos environment like a riot.
What prevents anyone from the other side to simply don the same thing? That's the point you are overlooking here.
The thing is, all of those problems still apply in a military context. It's not so much regulated as it is that nobody bats an eye when you shoot someone you caught doing it.
If they apply in the military context, there is a chain of command and responsibility that stretches all the way from the low-ranking foot soldier to the top of politics.
If any army is found not adhering to this rule, that nation can be held accountable, the very person that ordered it or let it happen can be held accountable. Of course, nations like Russia (but undoubtedly the US, too) has broken this rule, but in case of Russia, that lead to sanctions by other nations in response. If this happens in a direct conflict, assuming that the side doing it loses, they are invariably going to be held accountable too (If the side doing it wins, this can still happen, but y'know... it becomes a bit more unlikely). Ironically, there was an incident in WW2 where German soldiers wore US uniforms to infiltrate a base, but this was deemed ok in a later court case, since the German combatants ditched the uniforms before engaging their enemy.
Nothing of this applies to random shitheads on the street and uniforms can't be enforced by anyone on any level. Say the counter-rioters don whatever uniform they want, let's say it's giant illuminated inflatable penis hats, what prevents someone else from taking that very same thing to camouflage themselves as counter-rioter? Who is going to punish that person for doing that - if you can even prove it?
And then there's the issue of seemingly painting a bullseye on your chest by wearing for instance a MAGA hat.
I simply doubt that any side will really pick up a uniform, if only for the lack of a deciding body behind the different groups. We're not talking about armis with quartermasters that hand out uniforms, we're talking about a horde of dipshits with guns LARPing as insurgents.