It's only unethical if it 1) doesn't work or 2) is carried out involuntarily or without appropriate counseling, or without an actual diagnosis. Around here, that isn't the case (or at least it didn't use to be, things may have changed). People undergoing the procedure know full well what they are getting into, they are rigorously screened and diagnosed, and offered options (for some, counseling is enough, for others, hormone treatments without surgery). And given the low incidence of regret, and the generally improved quality of life following surgery, the conclusion must be that both the treatment and the screening work.
Other than the things I mentioned, how do you imagine that gender dysphoria is treated? It's no longer considered to be a mental disorder either, but something akin to being gay: it's all in the head, but it is innate to the person and not something that can be treated or "prayed away".