It could also be due to differences in character development. If Harry in the fanfiction has grown in a way that is no longer compatible with Edward, while Bella has developed in a direction that is more appealing to Edward. Maybe Harry has become more involved in a world or a set of values that Edward doesn't align with, and Bella represents a different, more attractive path for him.
Well, in some fanfictions, the author might justify it by showing that Edward has a deeper, more primal connection with Bella. Maybe he realizes that his love for Bella is something he can't ignore, and that his relationship with Harry was more of a passing acquaintance or a misjudgment in the first place.
One way could be through the idea of soulmates. The fanfiction might depict that Edward believes Bella is his true soulmate, and so he leaves Harry. For example, there could be some sort of supernatural sign or feeling that he has towards Bella that makes him feel like he has to be with her no matter what, even if he was with Harry before.
Edward might be initially shocked. He has always seen Bella as his own and this sudden change could be hard for him to accept. He could become withdrawn and moody, similar to how he was before Bella entered his life.
Edward might be initially shocked and heartbroken. He has been in love with Bella for a long time, so her leaving for Jasper would be a huge blow. He could become withdrawn and moody, brooding over what went wrong.
Well, at first, Edward would be in shock. He wouldn't believe that Bella actually left. Then, he would likely start to search for her frantically. He might go to all the places they used to go together, hoping to find her. His reaction could also be one of self - blame. He would think that it was all his fault, that he didn't protect her well enough or love her the right way. As time passes, he could become more resigned to the situation. But he would never really forget her. He might even try to keep an eye on her from a distance, just to make sure she's okay, even though she left him.
It could be that there are external forces at play. Maybe there are other characters or some kind of dark secret in the fanfiction lore that forces Edward to leave Bella while she's pregnant. For example, there could be a threat from a rival group that says they'll harm Bella and the baby if Edward stays, and he thinks leaving will draw the danger away from them.
Fem Harry might be heartbroken. She could initially try to win Edward back, using her magical abilities in creative ways. For example, she might create a magical memory of their time together to show Edward what they had was special.
She could be heartbroken. After all, she's pregnant and the person she loves has left her. She might feel abandoned and alone, crying a lot and wondering why Edward would do such a thing.
Edward would probably be very confused at first. He would try to understand why Bella would leave him for Rosalie. He might start to analyze all their past interactions, looking for signs that he missed. Eventually, he could become angry, not at Bella directly, but at the situation. He might also feel a sense of betrayal, not just from Bella but also from Rosalie in a way, since Rosalie is 'taking' Bella away from him.
Bella's character might become more confident. Without Edward, she has to rely on herself, which forces her to grow. As a vampire, she'll be more physically capable, and this could translate into mental strength as well.
It redefines it by making it unequal. Bella is in a position of being 'owned' in a sense, which is a huge change from their normal relationship where they are more like equals in love.
One possible plot could be that Edward, perhaps influenced by some dark magic or a misunderstanding, decides he has more in common with Harry. Maybe he sees Harry's courage and selflessness and feels drawn to that world. He leaves Bella heartbroken, and Bella then has to find a way to move on while Edward starts a new life in the wizarding world with Harry as his new friend or more.