Economics is hard
The number of factors that can impact supply and demand, and therefore pricing, is essentially incalculable and indeterminable. Certainly if anyone can determine and compute them all, they should become extraordinarily wealthy and powerful as a result, as the market would behave in a wholly deterministic and predictable way to them; their only limitation to doing so would be computational power (and if everyone, including the richest people and nations on earth, falls to that then we haven't really defied "incalculable"). The lack of such people (setting aside the more cynical takes on people such as Jeff Bezos) and governments is essentially proof that nobody really knows exactly how the market works on anything.
As such, the tautological reason that any argument that fails to predict a change in prices, or a lack thereof, had such a failure is because it did not account for every variable and/or their impacts with sufficient precision.
The most obvious factor, which is a fairly large umbrella for many factors, is simply:
All illegal trade carries costs from law enforcement which have to be accounted for in how much they charge: distributors locked up, products seized, production supplies confiscated, distribution networks destroyed (destruction of smuggling tunnels, say), etc. Most of that vanishes when the product is made legal and the seller chooses to operate legally. But politics and economics abhors a vacuum, and these costs simply get replaced by other ones. Regulation is the primary one.
To trade legally, you must adhere to standards set by the government. You will likely have to be licensed to produce and sell the product, your product will have to be tested at regular and potentially random intervals to ensure compliance, your bookkeeping must be done accurately and comprehensively and are subject to regular and potentially random inspections, your distributors will need licenses to distribute, you have to pay proper import fees as applicable, you can't just steal water/electricity any more, you have to operate in areas zoned for your commercial/farming activity, get building permits and certifications your building(s) are up to code, pay your workers competitive and minimum wages (none of whom can readily expect to just hide this from the tax authorities, and so rationalize taking a lower cash payment from not needing to pay taxes, or at least deciding not to; in the US the federal government still expects you to pay your taxes on your illicit gains, and if you don't you're now a tax dodger to boot), take out various forms of insurance, pay a whole slew of taxes, comply with IRS requirements on all of these things, etc. etc.
You also have fewer ways to "cheat" customers: you can't cut the drugs with other, cheaper substances because the government will test for that and fine you or worse for violations. The customers now also have avenues to pursue if you screw them over (other than just violence) without exposing themselves to legal danger, as they can now sue you in court for your damaging or negligent actions. And if you sell a crappy product, it's a lot easier for customers to find someone selling it at a higher quality (even if advertising the drug/product is still prohibited, the stigma is likely so heavily reduced, and ease of finding a new seller so elevated, that word of mouth suffices).
Drugs such as marijuana in the US have additional complicating factors in that they are still illegal at the federal level, which means they remain susceptible to being raided and shut down same as they were before (only now they're much more visible). This also aggravates their banking needs, as most banks are subject to federal regulation and so cannot knowingly serve the weed industry without major legal and financial risks. Customers subsequently can't just whip out their Visa to pay for it, either; they need cash. Sellers in the weed market often have to reinvent the wheel or keep large sums of cash just sitting around just to handle what anyone else would use a bank for, which is an additional cost and risk.
In short, the legal costs of operating illegally are exchanged for the legal costs of operating legally. It is entirely possible that the illegal way of doing things is actually cheaper as a result. Indeed, the legalization of the product may have reduced the costs of operating illegally, by reducing the threats of fines and imprisonment.