For long term baldness you could look into Finasteride and minoxidil as others have said, but are you just looking to prevent baldness or are you actually wanting to transition?
For transwomen, testosterone blockers like spironolactone can definitely help prevent and even reverse some hairloss depending on how far balding has progress. Sometimes Finasteride is prescribed at low doses to supplement and specifically target DHT to help with hair, most people who do this, like me, are either suffering from some baldness or are trying to prevent it when they know they are predisposed. Fin can also be used without a testosterone blocker at higher doses when someone can't or doesn't want to use a full anti-androgen for whatever reason, but it can have an effect on the libido and can cause some minor feminization like gynecomastia.
Typically, a regular HRT regimen of estradiol and spironolactone should prevent baldness in most cases if it isn't onset, but you could discuss adding the fin if you and/or your doctor deems it necessary.
For transmen on testosterone, they can definitely experience genetic baldness just like cismen. They can use the same tricks like minoxidil & Finasteride but will be more prone to baldness like cismen as opposed to ciswomen.