Yes, it is enforceable:
https://blogs.findlaw.com/law_and_life/2020/05/no-shirt-no-mask-no-service.html
The author needs to find a lawyer himself before making a blanket statement like that.
Here is another view point. Also from a lawyer.
https://legalmatch.typepad.com/businesslaw/2007/10/no-shirt-no-sho.html
Key phrase is If you're a business owner, make sure to check with a constitutional law attorney before you start kicking people out.
To make it simple the right to refuse serves to anyone is a very limited one.
For example if you try to prevent someone from shopping and they claim the actual reason was because they were (black, gay, disabled in some way) or even that you thought they were, you have to PROVE that was not the reason.
The rule is somewhat more relaxed with regard to what is considered special commissions. But even there, as the case of the several bakers and photographers shows you can still find yourself hauled into court.
As long as the client is not breaking any actual laws and ordnances you are on very shaky legal round even doing thins to discourage people from patronizing your business. As some found out when they played classical music in the hopes of keeping rowdy teens from hanging out in their stores.