You are regulating them. That's why we have Las vegas. Dumbass young men can travel to Las Vegas and lose their short once or twice and then they have that barrier between themselves and their addiction. It also means it's much easier to regulate, serious addicts for example used to be able to contact all the casinos in Vegas and get put on a list and they would not be allowed to gamble anymore.
The problem with gambling is that it is legitimately and clinically addictive. Prostitution is a problem but again it needs regulation.
Basically you don't completely criminalize something because yeah it doesn't go away what you do is heavily heavily and systematically regulate it. You control access to it in a positive way that prevents the worst damage.
Problem you're having is you are stuck in black and white thinking. Everything has to be either on or off, all or nothing. Gray area suck and their unpleasant to think about so I don't blame you but still.