A boy expressing themselves in a way that is considered feminine or a girl appearing masculine isn't a mental illness though. That's just socialization. In that situation they should supported and given outlets that are healthy to navigate through adolescence just like anybody else.
Now support may not be wearing a dress, but certainly giving them safe spaces to explore why they want to wear it and give them the critical thinking tools to make informed decisions for themselves as they move into adulthood.
But none of that I'd consider a mental illness necessarily. We had tomboys and effeminate males for generations that's not some reason for concern. Sometimes it's a phase, sometimes it's not but in either case there's no need to rush to make permanent decisions at an age when you're constantly changing and evolving still.
That's the issue in society beyond just any one issue. This rush to sexualize children and to make them declare and define who they are at such early stages in their development. Just let kids be kids. Let them try things, figure stuff out, invent themselves and then reinvent themselves again. It's just so much undue pressure for a kid to be placed in a box. Like who the hell really thinks a kid can make these kinds of lifelong decisions? The impact that goes so far beyond their own comprehension? Then why don't we let them vote, or marry, or drink and smoke, drive, and every other thing we restrict them from?
We live in a world where we tell these kids they can't watch an R rated movie because it has nude bodies in it, but that they can authorize changing their gender including changing the parts of their body they are allegedly too immature to see in film. It's just so backwards. And we would do these kids a world of good if we just left them the hell alone to be kids until they are entrusted with making decisions for themselves, full stop across the board.