The answer comes down to the difference between changing the creation of Allah and enhancing the creation of Allah.
If a person is psychologically transgender but is born a physically normal male or female, then a sex change operation would be changing the creation of Allah. For a person to physically be a healthy male and to psychologically believe he is a female is a detachment from reality.
Such a psychological issue should be addressed with psychological treatment, not with physical treatment.
If a person is physically transgender and born both physically male and female, then having gender changing treatment, like hormonal therapy, is not against nature. It does not change the creation of Allah, it enhances it. Since that person is physically both genders, the treatment only suppresses one gender and enhances the other gender already in them.
As to whether a physically transgender individual would go to the men’s side or the women’s side, such an individual would go to the men’s side in Islam, not the women’s side. Hadrat Um Salama (a wife of the Holy Prophet) narrated that once the Holy Prophet sas was in her house, and an effeminate man was there too. The effeminate man said to ‘Abdullah, (Um Salama’s brother):
“O ‘Abdullah! If Ta’if should be conquered tomorrow, I recommend you the daughter of Ghailan, for she is so fat that she has four curves in the front (of her belly) and eight at the back.” So the Holy Prophet(Sahih al-Bukhari, Book 77, Hadith 104)
sassaid (to his wives) “These effeminate (men) should not enter upon you (your houses).”
Fat was taken as something physically desirable, and the attractiveness of a woman was being inappropriately described on this occasion.
One reason women are to also observe veiling from transgender people is that transgendered people socialize openly with men, and this can compromise the purpose of women’s