This issue used to worry me as well and make me think that my gender dysphoria was not real.
It turns out that all people masturbate. Some a little, some a lot, some almost never and some dressed as women or not. Some do it to fantasies imagining themselves having relations with men and/or women and some, like me, do it while imagining myself doing something very intrinsically female.
I used to try and force myself to masturbate and in those moments afterwards revel in the fact that I didn’t really have gender dysphoria and that it was all in my head. The feelings return of course and don't go away unless you transition.
Sexual feelings need to be released and for people with dysphoria it may even help relieve the stress of having this condition in the first place.
If you, like me, were unfortunate enough to grow up religious and sexually repressed, masturbating to anything meant you were doing something wrong in the first place. Having it be that much more abnormal made it worse and only encouraged me to bury the feelings that much harder.
I can laugh about this now but it was certainly no laughing matter at the time.