Conversion therapy has been attempted unsuccessfully for over 100 years.
That alone tells me that the root cause is not some "mental illness" but something deeper within us, like genetics, that cannot be changed. If it were something like a mental issue, then treatment such as conversion therapy would have a high success rate and be endorsed by the medical and mental health community.
Since it has a high failure rate, the indication is that it is something else. And that is why over 26 professional medical associations, like the American Medical Association and the American Psychiatric Association, endorse gender affirming care to align the body with one's mental image of self. And by adopting this approach have found a success rate of over 97% for those who follow the medical protocols.
I suspect that this debate will continue for another 100 years, so long as people with no medical background and strong opinions are allowed to decide the laws against us.