There's a difference of opinion on this. The more commonly encountered opinion among scholars is that transitioning is haram. Examples of fatawa which unequivocally declare it haram are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13.
There's not much nuance in this case: mostly the evidence is it's "changing the creation of Allah" and "men imitating women and women imitating men" (see my answer to Can transgender people be Muslims, and how do gendered rules and rules about marriage apply?).
As you say, from a transgender person's perspective, not transitioning would be "men imitating women and women imitating men" (and thus haram). And it's permissible to surgically correct birth defects (Islam Q&A), which would be more in line with how a transgender person perceives their original body. Consequently, a transgender person would regard anti-transgender fatawa as not applicable to themselves, instead applying to e.g. men who dress up like women for perversion.
Nowadays attitudes seem to be changing, and there's been news of more trans-accepting scholarly stances in Pakistan, Egypt, and Malaysia. And in Iran, it's been officially accepted for a long time: There is no harm in undergoing the said operation if the end result would be determining of the true sex of the person ... (Leader.ir)
Even Islam Q&A, who tend to produce stricter fatawa, after describing transitioning as ordinarily haram, acknowledge this as a medical possibility:
You should consult experienced specialist doctors. If they determine that you are male in outward appearance but are in fact female, then you may submit yourself to their treatment, so that they can bring out your femininity by doing surgery. But that will not in fact be a sex change from male to female, because this will not be up to them; rather it will be bringing out your true nature and removing what is in your body, and what you feel deep inside you of confusion and ambiguity.
What gets mentioned in this dialogue is:
Being of a certain gender is innate and decided by Allah, whereas biology results in all sorts of problems. The scholar mentioned in the Malaysian news articles claims al-Nawawi classified these as Mukhannath min Kalqin, and states:
Since their identity is inert and not an impersonation, as long as they do not use their identity for immoral purposes, it is not a shame and they are accepted in Islam.
Al-Nawawi is quoted on Wikipedia.
There's a medical necessity for this treatment (on a case-by-case basis): Medical treatment ... are effective in alleviating gender dysphoria and are medically necessary for many people (WPATH Standards of Care V7 (pdf)).
That transgender behavior has a scientific basis and is observable in children.
Hai pointed out that studies have shown that the GID is an organic mental disorder and not only psychological, or educational or a defect in parenting during childhood.
quoting Osama Abdel Hai who is described as the head of the Gender Reassignment Committee of Dar Al-Ifta; in Transgender in Egypt: Islam’s stance on sex reassignment surgery, 2018
Another aspect to consider is that failing to transition may result in sins such as suicide, apostasy, and lesbian or homosexual activities.