Legalizing drugs wouldn't automatically decrease the law enforcement budget. Drugs being illegal actually costs money, and legalizing them would not decrease the available budget. If anything, legalized drugs would increase the available budget as legal drugs would be taxed in the same way tobacco/alcohol are.
The cops would just need to find something else to do, and there is plenty of other non drug related crime that they could investigate. Plenty of crimes get ignored by the police these days because there are insufficient resources to investigate them. If you were to reassign all the resources used to investigate drugs then there would be a lot more available to police other matters.
Even jails wouldn't necessarily lose out all that much, as while investigating other crimes the police would catch more people committing other crimes, crimes which cause harm to innocent parties (Which is often not the case with drug use).