If you're prone to hair loss steroid use can and does speed it up. I wouldn't wanna spend thousands on an op only to then use a drug which speeds up hair loss.
Basically if you are willing to get a hair transplant you have to choose between having hair or doing aas. If you are susceptible to hair loss you cant run away from it and aas will just make it happen faster.
Steroids can contribute to hair loss but ultimately genetics are the main factor. If you are prone to MPB then either don't use steroids or just shave it off.