When Harry receives his Hogwarts letter, somehow it knows.
He almost gasps when he sees the name “Harry Potter” and he blinks furiously, trying to make out if that can really be right. The name changes, to another name he’s been consindering, and it keeps doing so every time he looks back down on it.
He almosts expects Vernon to think the letter was delivered to the wrong adress, since there’s no-one with any of the names the letter showed him living at Privet Drive 4. When Vernon holds it up, however, it shows him Harry’s birth name and there can be no doubt the letter is intended for him. Vernon still won’t let him have it though and Harry expects that’s that, that he missed his chance.
Of course he does get the letter eventually, from the biggest and kindest person Harry knows. Hagrid asks him his name - his real name, he says, when Vernon yells Harry’s birth name in protest - and without knowing when he made the decision, “Harry” is out of his mouth and Hagrid is smiling at him.
The news that it was The Boy Who Lived, not The Girl Who Lived who was to enter the Wizarding World soon - or at least that there was a distinct possibility it was so - must have been spread beforehand, because though Harry does hear a few people call him a girl, most shoots Hagrid a questioning look before going ahead and greeting Harry as “Mr. Potter.”
While Ron is in awe of him, he doesn’t seem to be even remotely phased that his childhood hero is another gender than he’s been told for years. When Harry asked about it, Ron merely said “one of my brothers, Charlie, is trans too” with a small shrug.
It took Hermione a bit longer to adjust, since she’d heard nothing of it till she entered their compartment, and the books told her differently. She did adjust though, and did so on her own, and she has been completely finished doing so for weeks by the time they became friends.
Surprisingly, while Malfoy was not above making quips about Harry’s manliness now and then, he never misgendered or deadnamed him. Didn’t mean Harry didn’t despise the guy, but still, it was something. Harry knew very well that no bully back home would have held back from that.
The first time he had a crush on a guy, he wouldn’t acknowledge it; he felt like it discredited his gender. He knew it was a silly notion and Ron told him as much, when Harry told him and Hermione about it. Hermione, meanwhile, responded with far more sensitivity that though his feeling were valid, his gender and sexuality were seperate from each other. Both helped in each it’s way, as was characteristic of his friends.
Over the years, those who said The Boy Who Lived deafend out those who still clung to misgendering him.
Once he left the Dursley’s, he felt like nothing was holding him back in that regard anymore. He’d been taking hormone blockers, or at least a potion that worked the same way, since he arrived at Hogwarts. Due to time he spend in the Muggle world, he hadn’t been able to start hormones, and running around hunting down horcruxes wasn’t exactly the most oportune time to start. That didn’t bother him much, though. In that one regard, he was satisfied.
Even as he despaired over a thousand other things, his gender was not one of them. He was loved and accepted as his true gender; that was enough.