Consider that some countries have state monopoly stores for wine and stronger alcoholic drinks, and most no longer allow advertising for alcohol.
Similarly, consider the option of regulations like those in place for pharmacies in some countries, that e.g. requires the pharmacist to ensure you are aware of certain risks, but doesn't prevent you from buying.
Consider the way some countries now requires tobacco to be out of view and with health warnings all over or no branding.
In other words: There are mechanisms you can put in place that legalizes drugs fully, but still heavily restricts commercial entities ability to try to take advantage of peoples weaknesses.
Personally I believe even drugs like heroin should be legal, on the basis of harm reduction, but at the same time, I don't see a problem with e.g. restricting where it can be sold and ensuring that it's sold in plain packaging, no advertising is allowed, and to e.g. have a pharmacist inform you of the risks before selling it. I don't think that threshold will be high enough to make people go to a dealer, but it may still reduce abuse.
In the UK there are restrictions on how many pills of paracetamol (acetaminophen) and ibuprofen you can buy at a time, for example. In pharmacies you can buy up to 32 of each at a time, while elsewhere only up to 16 of each at a time. Those restrictions were put in place because of overdose deaths, and they appear to have saved hundreds of lives so far, while being lenient enough not to drive anyone to a black market.
So while I think we should be allowed to buy pretty much whatever drugs we want, we can combine that with making it sufficiently unattractive that you're not buying them on a whim.