Rav Eliezer Waldenberg (Tzitz Eliezer 11:78), writes that for a person who cannot have children already, castration would not be prohibited. This brings up two possible extensions.
Hormone replacement therapy (taking estrogen and testosterone blockers) is an important part of the larger process of transition, and during this process, the male generally becomes chemically castrated. Thus, if the individual undergoing male-to-female transition is already chemically castrated due to hormone therapy, the prohibition of סירוס should no longer apply. In theory, one could argue that this merely throws the prohibition of סירוס back on to the process of taking hormones. Nevertheless, this argument is far from decisive. Taking a single dose of female hormones will not render a morphological male sterile. As there does not appear to be any objective point at which the next dose will cause sterility, it is hard to declare any single act of taking hormones an act of castration. Moreover, whether chemically causing sterility can be defined as an act of סירוס is also unclear.
Rav Moshe Feinstein (Iggerot Moshe, EH 4:36) permitted a woman who had a severe nervous condition to have a tubal ligation, even though he considers this to be forbidden (ibid 4:35). Since the need for expression of one’s gender is basic to a person’s identity, it is known that quashing the person’s ability to do so risks the person’s life. An exceedingly high suicide rate exists among those who are prevented from expressing their gender identity and being true to themselves with respect to gender expression. (The case of Leelah Alcorn is one sad example of this trend.) Thus, the Talmudic principle of “’וחי בהם’ – ולא שימות בהם” (‘live with them’ – but do not die because of them)” should be a factor here. (Farber 2015)
Mental anguish, no matter how genuine, is not sufficient reason to suspend Torah law... Mental pain, even if genuine , cannot be a rationale for permitting transgressions or suspension of Torah Law. No one is discounting the unhappiness of a person who feels, for whatever reason that (s)he is somehow trapped in the wrong body. But the Halacha remains the Halacha, and the individual's distress cannot be used as a lever to displace Torah prohibitions (Rabbi Alfred Cohen, 2017)
Responsa Lev Aryeh Vol. 2 No. 49
Concerning the incredible even that occurred with a man who became a woman
When I presented the matter before the expert doctors dealing with obstetrics, they all agreed that even when we have a certain male who is injected with hormone drugs such that his facial hair falls out and he grows breasts, and even if his male organ can be reduced – although the removal of the male organ entirely and the development of a womb and a female sexual organ as a woman is impossible without surgery where they make a hollow there in ‘that place’, and certainly [even if a procedure is done] in this manner he has not transformed into being a female, and he is certainly a male and is in no way a woman whatsoever.
Changing what G-d Made
"One could speculate that there is a difference between making improvements to an existing feature of the world Hashem created, which is permitted, and creating a new species, such as the mule, which is forbidden. Grinding grain and kneading it into bread is improving the grain for human use, which is not the case with creating new species which alter and repudiate G-d's plans for creation (Cohen, 2017, p.26)