I remember reading this advice from Dave Arnold who experienced real riots and a lot more while he was in Southern Rhodesia. He also was present in the aftermath of some. I know he was in the Rhodesian Army and was a cop but don’t recall if he was a Selous Scout.
Typically a crowd will run away at the sound of the first shot. If they are really hopped up and angry enough, they will kill you no matter what you are armed with and no matter how good you are.
No Hollywood BS. The real world is a lot nastier.