I think there is a line between confidant and ‘keeping things from dad’.
If dad is not going to be helpful (fly off the handle and get all hysterical) then maybe just take the lad under your wing - take him for days out (just out for lunch, to the cinema etc) and let him talk.
Ask him questions - what can he do now, what can’t he do - why? If he was ‘a girl’ what would that actually ‘look like’ - what could he do that he can’t do now?
I assume of the dad is macho the boy fears he is homophobic maybe?
See who else is ‘advising’ him (chatrooms, online gamers etc) and remind him that people often have ‘an agenda’ (in therapeutic case we’d call these the vampires of saboteurs - and it’s not always conscious). Ask him what he plans for the future - studies, work, where he’d like to live etc.
Show him that the world isn’t black and white and that there are some fashions/trends that are just that, a fashion or trend. Help him to look forward - he is still going with his life ahead of him, and options!
Try to focus on his health - physical and mental well-being. This pandemic has caused a lot of kids to be isolated and build their own little communities online. Remind him that ‘on the internet, nobody knows if you are a dog’. Some people just aren’t what they seem