One reason could be that in this fanfiction, Snape has some hidden kindness towards Harry that he doesn't show in the original story. Maybe he secretly protects Harry from other threats, which makes Harry feel safe around him.
In the original series, Harry and Snape have a very tense and often hostile relationship. But in this fanfiction, their relationship is likely to be much more positive. Harry feeling safe with Snape means there is a sense of trust that was absent in the original.
One possible reason could be that Snape has shown unexpected kindness to Hermione in the fanfiction. Maybe he has protected her from some danger secretly, which makes her feel she can rely on him and thus feel safe.
In the original series, Snape is often quite harsh towards Hermione. However, in this fanfiction, the relationship is completely different. Here, Hermione feels safe with Snape, which is a huge deviation as in the original, she would be more likely to be on guard around him.
One possibility is that the fanfic changes Snape's backstory to make him more sympathetic. Harry, being empathetic, then feels safe around him. For instance, if Snape's past is shown to be full of hardships that made him act the way he did, Harry might understand and feel safer in his presence.
In some fanfictions, it could be that the author has rewritten Snape's character in a more approachable way. Maybe Snape shows a side of himself that is protective towards Harry, like secretly guiding him in his magic studies without the usual harshness, which makes Harry feel safe.
Perhaps in this fanfiction, Snape has proven himself to Harry in some extraordinary way. Maybe he has saved Harry's life multiple times or has shown his true loyalties that were hidden in the original story. It could also be that Snape has some special connection with Harry that makes Harry trust him unconditionally.
Perhaps in this fanfiction, Snape shows a side of himself that is completely different from what Harry has known. He might be more open and honest with Harry, sharing secrets that make Harry believe he can be trusted. Like Snape might disclose some long - held information about Harry's parents that only he knew, which makes Harry think Snape has been on his side all along.
As the story progresses, they might start to work together more closely. Snape could be teaching Harry some advanced magic that no one else knows, and through this process, they build a bond. Harry begins to understand Snape's past better and realizes that they have more in common than he thought, like their love for Lily Potter in different ways.
Perhaps it's because Snape is a complex character in the original story. Fanfictions might explore his character in ways that make Hermione seem protected in those fictional scenarios. For example, some fanfictions could depict Snape using his knowledge and power to shield Hermione from various threats within the magical world they inhabit.