This is the missing step in the Portugal model.
Want free drugs? The government will provide that if you demonstrate addiction with a drug test, and be willing to tell the police where you got the drugs. For plausible deniability, perhaps only 10% of addicts are actually asked.
Drug dealers can't compete with free. Drug addicts will eventually cave and get the supply. Vigorously prosecute the property crimes addicts use to get high.
Once the drug dealers are out of a job, you can start tagging the drugs so they appear as government-issued on the drug test, and start tapering the supply for everyone.
You will probably never get to zero that way, but you can eradicate most of the crime at a fraction of the cost of the current policing and healthcare support methods.