Asalamualykum,
Islam is as clear as day & night. Alhamdulilah. It's us people who make life difficult for ourselves.
Praise be to Allah.
Firstly:
It is not possible for anyone, no matter who he is, to change the creation of Allah, may He be exalted, from male to female or vice versa. Whoever Allah, may He be exalted, has created as a male can never become a female who menstruates and gives birth!
Secondly:
What a person may feel in his mind and heart, that he is of a gender other than what he appears to be to us does not give him an excuse to change his gender; rather it comes under the heading of following the Shaytaan in changing the creation of Allah – outwardly but not truly – and those feelings do not make it permissible for him to undergo surgery or take medicines and hormones to change his outward appearance. Rather he must be content with the decree of Allah, may He be exalted, and treat his case on the basis of faith and obedience to Allah. It is not permissible for him to make himself appear outwardly to be of a gender other than his real gender with which Allah created him, otherwise he will be committing a major sin; if this person is really female then she will be masculinised and if he is really male then he will be effeminate.
If you wish to read more please visit: https://islamqa.info/en/138451