The situation is a lot more nuanced than that.
I challenge you to find an example of a blanket ban on all masks, that doesn't rely on other factors like threatening violence, rallying, intent to hide identity, or a respresenting specific gang design/color.