In a lot of such fanfictions, Ron could be influenced by dark magic or some outside forces. For example, a powerful dark wizard might use a spell on him to make him turn against his friends. He could then give away their secrets or plans to the enemy. This would put Harry and Hermione in great danger and they'd have to find a way to overcome the situation without Ron's help at first.
Well, it could be that in these fanfictions, a dark influence overcomes Hermione and Ron. They might be manipulated by a powerful dark wizard who makes them believe that betraying Harry is the right thing to do. It could also be a miscommunication situation where they think they are helping but end up betraying Harry. For instance, they might be tricked into believing that Harry has turned bad and needs to be stopped.
At first, Harry might be confused. He would try to figure out what went wrong. He might search his memory for any signs that could have led to this betrayal. Then, he would likely experience a range of emotions from sadness to rage. Depending on the nature of the betrayal, he could either try to win them back by showing them the truth or decide that they are no longer worthy of his friendship and focus on his own path, maybe even leaving the wizarding world for a while to clear his head.
Hermione might seek revenge. Given her intelligence and magical abilities, she could use her skills to get back at Harry and Ron for their betrayal. This could lead to a big rift in their friendship and even endanger their common goals in the wizarding world. She might also side with other characters who are against Harry and Ron, changing the whole dynamic of the story.
The plot could take many directions. It might deal with the reactions of other characters to Ron's sexuality and how that influences the relationships. Maybe there are challenges or conflicts that arise specifically because of this twist.
It could be that a prophecy reveals something that makes Ron and Hermione think Harry is a danger to the wizarding world. They might decide to betray him in order to protect the greater good. However, as time goes on, they could realize their mistake. But by then, the damage to Harry's trust would already be done, and he would have a hard time forgiving them.
In some fanfictions, it might be because of a love triangle gone wrong. Suppose Ron had unrequited feelings for Hermione and thought she favored Harry too much. And Harry, perhaps misinterpreting Hermione's actions in a crucial situation, joined Ron in betraying her. This would be a complex and emotional reason for the betrayal.
Jealousy is a big one. Ron often feels like he's in Harry and Hermione's shadow. He might see their achievements and feel left out or unimportant, which could lead to his betrayal.
Well, Hermione might choose to simply ignore Ron at first. She's got a lot on her plate, like her studies and helping Harry. But if he continues to be a git, she'd probably use her intelligence to outwit him in some way. Maybe she'd come up with a really clever comeback that would leave him feeling stupid. She could also choose to distance herself from him, like spending more time with other friends or focusing on her own projects.
In some fanfictions, it could be a misunderstanding that spirals out of control. Hermione and Ron misinterpret one of Harry's actions. For instance, Harry might be trying to protect them in a secret way, but it looks like he's up to something bad. Their lack of trust then grows, and they end up betraying Harry, perhaps by not coming to his aid when he really needs them, which could have serious consequences for Harry.
Yes, there are some out there. One example might be on FanFiction.net. You can search for it using those keywords and look through the reviews to find a well - written one. However, different people have different ideas of what 'betrayal' means in this context, so you might need to read a few to find the one that suits your idea.