Cocaine - there's decent evidence for extended-release amphetamine for reduction of heavy use days. Other outcomes (abstinence, etc) are equivocal.
https://onlinelibrary.wiley.com/doi/full/10.1111/add.15242
Methamphetamine - best current evidence is bupropion + extended release naltrexone
and mirtazepine
https://www.sciencedirect.com/science/article/abs/pii/S0376871622000321
What i'm talking about specifically is people who have a stimulant use disorder AND meet criteria for ADHD (~60%+). In that case, you want to maximally treat the ADHD on the label, and it's very often that the ADHD treatment requires higher doses of stimulants. You can start with the non-stimulant treatment, and typically the response is no response.
Several good reviews on this topic and you can do a quick search.
This is relatively new literature and generally is not as widely disseminated in many practices/programs. My clinical experience has been that these treatments can work very well have not never had a case of prescription stimulant diversion/abuse. As a specialist in this area, I do encounter patients with prescription stimulant diversion/abuse, but the classic profile there is very different--the classic profile here is a younger adolescent with borderline/impulsivity/antisocial features. The bottom line is that commonly used long-acting stimulants just don't give you much of a high unless you have a fairly obvious personality disorder.