It depends on the payer. In the past few years, a former student of mine made some type of formal recommendation to CMS that instead of collecting present sex/gender on a patient, the "sex at birth" be provided as an alternative. It's doubtful such changes have been made, but let's hope they come down the pike with ICD-10 . . .
I've run into this multiple times, one of which required that the MPI of the patient be temporarily changed to reflect the previous/original patient sex, the claim was then submitted and the MPI returned to the existing sex. That was a lot like dancing with a fire baton, in my opinion.
I have the coder's intuition that your case will not be solved as easily. The sex reassignment diagnosis may not really make a difference with the payer. In my mind, this is a medical necessity denial and requires a deep discourse with the payer, given its responsibility is to maintain the patient in good health. Too, I might discuss this with the patient so that any bills that become patient responsibility are not too much of a surprise.
There is not much of a book or solid reference on these matters, I'm afraid. However, in my professional life, it has become an increasingly common problem to close accounts and submit claims successfully on these patient encounters.