it's thinking you are something you aren't. how is that not a mental illness?
50 years ago they would lobotomize people. the guy who created the technique got a nobel prize. now we cut off people's junk and shove hormones that their body correctly isn't making.
both things are invasive and destructive and done to ease symptoms. that doesn't make either lobotomies or sexual reassignment surgery morally acceptable