Funny how that whatever they are yelling at you for isn't even loitering. Give them the finger and keep on doing whatever you are doing.
New York Consolidated Laws, Penal Law - PEN § 240.35 Loitering
Current as of January 01, 2021 | Updated by FindLaw Staff
A person is guilty of loitering when he:
1. Repealed by L.2010, c. 232, § 1, eff. July 30, 2010.
2. Loiters or remains in a public place for the purpose of gambling with cards, dice or other gambling paraphernalia; or
3. Repealed by L.2010, c. 232, § 1, eff. July 30, 2010.
4. Being masked or in any manner disguised by unusual or unnatural attire or facial alteration, loiters, remains or congregates in a public place with other persons so masked or disguised, or knowingly permits or aids persons so masked or disguised to congregate in a public place; except that such conduct is not unlawful when it occurs in connection with a masquerade party or like entertainment if, when such entertainment is held in a city which has promulgated regulations in connection with such affairs, permission is first obtained from the police or other appropriate authorities; or
5. Loiters or remains in or about school grounds, a college or university building or grounds or a children's overnight camp as defined in section one thousand three hundred ninety-two of the public health law or a summer day camp as defined in section one thousand three hundred ninety-two of the public health law, or loiters, remains in or enters a school bus as defined in section one hundred forty-two of the vehicle and traffic law, not having any reason or relationship involving custody of or responsibility for a pupil or student, or any other specific, legitimate reason for being there, and not having written permission from anyone authorized to grant the same or loiters or remains in or about such children's overnight camp or summer day camp in violation of conspicuously posted rules or regulations governing entry and use thereof; or
6. Loiters or remains in any transportation facility, unless specifically authorized to do so, for the purpose of soliciting or engaging in any business, trade or commercial transactions involving the sale of merchandise or services, or for the purpose of entertaining persons by singing, dancing or playing any musical instrument; or
7. Repealed by L.2010, c. 232, § 1, eff. July 30, 2010.
4: Masking up and hanging out, especially in a group, for potentially nefarious purposes
5: Hanging out in or around a school you have no business being at or in.
6: Selling shit on public transportation or transportation hubs.
With the exception of the mask thing (which should be repealed for health purposes. We should encourage people to mask up when they are sick, COVID or not), that all seems fairly reasonable, and not at all what is happening in the picture. Unless OP is wearing a mask, I suppose.
Being by no means familiar with legalese, I am amused that at least one of those seems to be "a person is guilty of loitering if they loiter." (Apologies in advance if that's a complete misread.)