Theoretically wouldn't it hurt a cartel drug market if all drugs were legal?
Looking at the way the black market thrived off of the distribution of Alcohol during the Prohibition? Some people believe the war on drugs can be waged economically rather than through banning and law making.
Not necessarily no.
If drugs were to be made legal there is no way in hell that a government wouldn't then enforce taxation on them. Both to earn money off of their legality, but also to track the sale of drugs.
And there are some drugs that a country won't legalise, like Heroin, solely on account of how dangerously addictive it is, and how it aids the spread of disease (like HIV) and is more likely to cause death.
Ultimately a cartel will gladly produce and sell drugs illegaly, to avoid tax, at a cheaper rate than the government allows it to be sold.
It might impact on some smaller drug dealing operations, but it won't phase massive established drug cartels.
Even if it did, in say, the sale of cannabis, they'd soon move to the production of other drugs.
Prohibition didn't work too well on account of how culturally ingrained alcohol consumption was on the entire populace. Unlike Cannabis and other drugs, almost everyone tries/consumes alcohol in their life.
But that doesn't mean legalisation removes the issues. Cigarettes and Alcohol are legal and taxed, but there are still countless accounts of people illegaly selling them without tax.