It does prevent state violence the same way nukes prevent world wars. State violence rarely looks like soldiers vs citizens, because soldiers would rebel if they were given such an order. What tyrannical states do is they employ a third party, gangsters or cartels, that are given a carte-blanche to terrorize citizens. See what happened in Hong Kong: CCP hired Triads, those attacked citizens, while the riot police standed behind and arrested _citizens_ who dared to push back. The same cannot happen in the US because the gangsters would be outnumbered 1000:1, and the order to engage soldiers against citizens would split the army into competing factions. Edit: when I say gangsters I don't mean those who rob banks, I mean radicalized mobs who are far more dangerous because their motive is not money, but ideological control.