Obviously the cause is psychological, however to call it a mental illness is likening it to someone with perhaps diminished capacity, which doesn’t apply to trans people.
That is a truly appalling thing to say about people with a mental illness. Someone with postnatal depression has a mental illness but that doesn't necessarily mean that they have diminished capacity.
The nuance I think with trans identifying males is that there are broadly 2 different types. The first are often smaller boys who are perhaps looked down on by their peers as "weedy". Sometimes they may therefore eventually identify out into living as women - their slight stature seems to fit in better that way (although they still have masculine markers that means they don't pass). Most of these just want a quiet life and it's a way of opting out of the toxic masculine culture of the post rugby changing room. I know a couple of these - they are quiet, academic, tend to dress like their mothers, aren't looking to anyone else for validation, just acceptance of how they choose to look, and want to get on with their lives. When I've associated with them have, crucially, not used the ladies loos. (I imagine that they use the disabled loos - maybe an argument in itself but I'm not going there.) Then there are the guys who want lots of attention for how they look, with their sense of masculine entitlement are muscling into women's spaces because life owes them whatever they want. This type has really flourished in recent years and that is at the expense of women. It is this type that make the headlines - from inflicting themselves on nurses in NHS changing rooms to demanding access to women in prisons because of their feelz being so hurt they will otherwise commit suicide (coercive control) to cheating in women's sports, to violent protests and online harassment of women who stand up to them.