It is important to note this teshuva doesn't address the question whether sex change operations are permitted or whether they are viewed as prohibited because of castration or sterilization or other considerations. In addition there are strong objection from other poskim whether sex change operations are valid. (Rav Moshe Feinstein held that no change in sexual identity results from surgery.)
Tzitz Eliezar(10:25.26): It is necessary to seriously examine the question of identity in a case where a major organic change has been made in the body itself – for example a change from being a male to being a female or the reverse. According to what I have heard - and this has also been publicized by various newspaper columnists - these types of operations are offered today in special rare circumstances. In these cases in which the body is drastically changed, surgery truly creates many halachic questions regarding the establishment of identity and true status. Let me mention here what I saw in Zichron Bris L’Rishonim (simon 5) written by Rav Yaakov Hagozer.... In the course of a long discussion discussing tumtum, androgynous and other major physical changes in the body- he quotes from Yad Ne’man (Y.D. 64b) [published 1804] regarding a respected talmid chachom from Jerusalem who wrote about a number of cases where a woman became a man. He also explained that there is really no great difference between male and female genitals except that one is external and the other is internal (meaning that a woman has internally a foreskin and testes even though they are not like the testes of a man)... Given that reality, the author discussed his uncertainty whether the woman who has changed into a man is obligated in mila or whether she is exempt. He concludes that she is exempt since the verse for the mitzva of mila says to circumcise the “male foreskin”. This implies that circumcision is only required if a person is born a male but not someone who was born a female and became a male.... Similarly I saw in the sefer Yosef es Achiv (3:5) by Rabbi Yosef Pilaggi that he asks, “Whether a woman who led a normal married life for a number of years and then became a man - requires a divorce because she was his wife? Or perhaps no Get is required because she is no longer a woman but a man? He answers that it seems that she doesn’t need a Get because she is no longer a woman and the Get states that the husband is giving the Get to a woman who is his wife. The Get also states that it allows her to marry another man... and it obviously is not allowed for a man to marry another man... It would seem in my humble opinion that there is no need for a Get if his wife has fully become a man...It would also seem that in a case of a man who was originally a woman that he should not say the beracha ‘who has not made me a woman’ because he was in fact born a woman...instead he should say ‘who has changed me into a man.’...” ... In addition to the question whether the wife who has become a man needs a divorce from her husband, there is the question of when the husband becomes a woman whether the wife needs a divorce? (There was a famous case like this a number of years ago in one of the large European countries). In addition Rav Abulafia has raised questions regarding the status if the sex change is reversed and he becomes a man again? While thinking about this it occurred to me to relate this question to the Terumas HaDeshen (pesakim #102) concerning the wife of Eliyahu or the wife of Rabbi Yehoshua ben Levi – whether they could marry another man. He noted that the significance of the question concerns other cases in the future. The Terumas HaDeshen answers that only the wife of another man is prohibited to marry without a Get and not the wife of an angel who is a completely spiritual being without a physical body. See also Mahari Assad (E.H. 4) who explains the Terumas HaDeshen... that even though there was a valid marriage Eliyahu’s wife could remarry without a divorce... Then also in our case we can say that only the wife of a man is prohibited to others and not the wife of a woman. So even though there was a valid marriage, nevertheless the marriage dissolves by itself when it becomes a case of being the wife of a woman....So perhaps we can say that since marriage to an angel is invalid, therefore when Eliyahu became an angel the marriage dissolved by itself - so since marriage to another woman is invalid when her husband becomes a woman the marriage dissolves by itself. Furthermore concerning the issue raised by Rabbi Abulafia where the change reverses itself, we find a comparable analysis in the Birchei Yosef (E.H 17) where a man who died became alive again by a miracles - such as happened to the wife of Rav Zeira. Do we say that when he regained life, it was a new life or perhaps it simply revealed that his death was not really death? He wanted to answer based on a Yerushalmi ... however this is not a clear proof and this is thoroughly discussed in the Otzer HaPoskim - including the distinction as to whether the man was buried or not. However, everyone agrees that these serious questions raised by sex change are only for after the change and are not retroactive..