One possible reason could be a misunderstanding. Maybe her friends thought she was following but she got distracted by something, like a new spell she saw in an old book. So they unknowingly left her behind.
Perhaps her friends were in a hurry due to some emergency. For example, they got news of a dangerous creature nearby and rushed off without realizing Hermione wasn't with them. In fanfiction, this can lead to Hermione having to fend for herself and grow in unexpected ways.
One possible reason could be a misunderstanding. Maybe there was a miscommunication between Hermione and her friends, which led to them leaving her in the fanfiction. For example, if Hermione made a decision without consulting them, they might feel left out and decide to leave.
She might be initially shocked. But being Hermione, she would quickly gather her wits and start planning. She could use her vast knowledge of magic to find her way or to signal her friends.
One reason could be jealousy. Maybe her friends get jealous of Hermione's intelligence or achievements and act mean towards her in the fanfiction. For example, they might exclude her from certain activities or make snide remarks about her grades.
One reason could be jealousy. Maybe Hermione has achieved something great in the fanfiction, like getting a top grade in a really difficult subject, and her friends are envious. Another reason might be a misunderstanding. For example, if she's been spending a lot of time with a new character, her friends could misinterpret it as her neglecting them.
One possible reason could be a symbol of a new beginning. Maybe she's had a major life change, like starting a new chapter in her relationship or in her studies at Hogwarts. It could also be a sign of rebellion against the traditional image others have of her. In some fanfictions, she might cut her hair to fit in with a different group or to show that she's breaking free from her old self.
It could be a matter of loyalty being tested. If Hermione is accused of something she didn't do, and her friends don't believe in her innocence right away, they might leave her. In fanfiction, the author might be exploring the idea of how fragile friendships can be. Her friends could also leave if they feel that Hermione has changed too much, for example, if she becomes too strict or too obsessed with a particular project or cause.
One possible reason could be jealousy. Maybe her friends are envious of Hermione's intelligence and magical abilities. In a fanfiction, this could lead them to betray her to gain an advantage or to make themselves look better. Another reason might be a misunderstanding. A miscommunication or false assumption could cause her friends to turn against her.
It could be related to a specific event in the fanfic. For example, if she's going undercover for some mission, changing her hair color might be part of her disguise. Also, perhaps she's influenced by someone she admires and decides to copy their hair color.
Perhaps it's because the fanfiction offers a different perspective on the Death Eaters. It might show their motives or backstories in a new light that Hermione, being the inquisitive person she is, finds fascinating.
Ginny would be very empathetic. She'd probably try to understand Hermione's situation from a female perspective. Ginny might try to get some female friends or relatives to help out, like bringing food or warm clothes to Hermione. Luna would be her usual unique self. She might think that Hermione is on a special spiritual journey and would offer her some very strange but oddly comforting advice.