Yeah.. it seems to be a bit easier to study this stuff than to apply it to yourself (probably this is why so many therapists have therapists).
I don't have any lived experience with drug or alcohol abuse, though I think a couple of others here might.
One resource that you might find useful is this website: https://www.counsellingonline.org.au/ which was made for people dealing with drug and alcohol issues, and they have a couple of different services as well as another forum that might be useful.
Maybe even something like using a debit card instead of carrying cash might set up an extra barrier to you buying drugs, or only carrying so much money at once?
It obviously won't solve the problem, but it's something that might help along the process a bit.
Another thing I've heard of is wearing a rubber band, and gently flicking it against your hand or wrist when you're getting cravings. Again, this alone won't fix everything, but might be able to speed up your progress a bit.
It's really good that you've been able to identify that your anxiety is part of what's causing this.
Do you have any other ways of dealing with the stress at all?
For example, I know of one person with social anxiety who listens to music from earphones as she speaks, and others who use stuff like breathing and grounding exercises.
Other than that, are there any self care type things you can do for yourself after work?
This could be as simple as playing a video game or watching a movie.