They virtually got rid of opium usage in a relatively short time, and they did it without any sort of war on drugs approach.
They certainly fought the drug usage but they did not imprison or blame drug users. Rather than told abusers they were victims who needed help. They were given education to cope with addiction, jobs etc. Even drug dealers were, except the worst ones who were imprisoned.
It might have helped the narrative that they could blame Britain as the evil doer.
While not the same as legalization it does have some resemblance to the Portuguese approach where the focus is on helping people taken for abuse rather than punishing or imprisoning.