Nowadays, gambling is on 2 fronts : in-person and online. I am not sure about % distribution between them but I suspect online is not too small. In-person gambling operations should be fairly easy to ban.
But online is a different problem because there will always be some country where gambling websites are legal.
And what's stopping gamblers from bypassing online restrictions (VPNs, cryptocurrencies, etc)?
I think an un-enforceable law holds no value and shows naive idealism. I agree that banning gambling would save the in-person gamblers but eventually, we risk them converting to online gamblers. (If vast majority of gambling is in-person, then maybe it's worth it).
It's an interesting coincidence that gambling laws are becoming more permissive in most places now that online gambling is becoming more prevalent. Another comment wonderfully put it as a possible prisoners dilemma. If place#1 bans gambling, gamblers from that place would go to place#2 that has gambling : now place#1 has both gamblers and less-tax-revenue while place#2 has same gamblers but more-tax-revenue.