I think the economics of a physical drug substance and gambling are different enough that it’s actually un-apt to draw a comparison between sports betting and alcohol prohibition. Indeed I think it's actually highly misleading to extrapolate the harms caused by alcohol/drug prohibition to the prohibition on gambling. Caveat: this is all armchair speculation, I have no expertise or research on the matter.
In the case of black market gambling it seems much easier to keep everything within my direct control, thereby limiting the risk of getting a bad product. I can make a wager or play a poker game with my buddy without taking on virtually any “undue” risk (aside the risk I’m taking on intentionally) because he’s my friend and I know he’s not going to kneecap me if I can’t pay. The chain of trust only needs one link, and it’s an easy one to verify. Some people clearly do go farther, and this isn’t to say that large-scale illegal betting doesn’t exist, but it seems like the majority of recreational gambling demand is met by this type of direct person-person transaction where trust is easy-ish to establish or enforce. In this case banning betting has limited harms, because for most people the black-market is relatively low-risk. Indeed legalizing it, and thus allowing big players into the game, actually seems less safe to me. A friendly poker game on Friday nights is going to self-regulate: nobody's too sharp, everyone has roughly equivalent cash reserves, and my friends are probably going to cut me off if it seems like I'm developing an addiction. In the long-run I'm unlikely to find myself too deep in the hole. Compare this to sports betting with DraftKings. I'm against an odds-maker who's WAY savvier, has much deeper reserves than I do, and is incentivized to keep me playing at almost any cost. It's orders of magnitude more likely that I'm going to blow everything I have and then some, and all through a frictionless iOS app while sitting on my couch.
Compare this to the illegal drug trade. Unlike purchasing gambling services, buying ex. cocaine from the same buddy requires a much longer chain of trust, because of the manufacture and distribution processes involved. Even if I trust my buddy not to sell me fentanyl, I have to trust his dealer, and his dealer’s dealer, and the dealer’s dealer’s supply, etc. In this case I very much want lots of regulation ensuring the product isn’t contaminated, contains what it’s supposed to, etc. Legalizing just takes the already-existing supply chain and big players and moves them under government control. In this case the legalized version is far safer than the black market equivalent.
W/r/t legal enforcement side of things the differences seem similar. A small bet between friends is basically impossible to prosecute. It’s only the really big organized stuff that is even possible to detect, legally. On the other hand, a small amount of personal cannabis is very easy to detect and prosecute, often easier than the professional distribution network.