It illegal to both wear and not wear a face mask in New York
twitter.com
twitter.com
And minorities often feel it harder:
https://www.cnn.com/2020/04/07/us/face-masks-ethnicity-coron...
As for NYC, I assume even without explicit overriding, police are under orders not to enforce the "no masks" part.
Even beyond the legal bit, I assume there's a real security risk too, since actual robbers have cover for wearing a mask and people won't raise their guard or (of course) call the police about it.
It is not a grammatical error: such an error would mean that the sentence is not constructed according to the grammatical rules (of English), when clearly it is. What you probably meant is that it's a semantic error: the writer used a construction which doesn't not convey the intended meaning.
As an example, substitute the impossible fact of both wearing a mask and not wearing a mask by "both walking and not looking frontward" and you would obtain a sentence following the same construction, yet doesn't seem to carry an incorrect meaning.
The effect of such a combination of laws would be to make it unlawful to go outside. The effect of a law as stated in the tweet would be to make enforcement impossible, as nobody would be both wearing and not wearing a mask: each perp would be doing one or the other.