you dont want to stop being friends with her because you sometimes have fun together but you sound as though you want her to stop doing this. friends matter and we feel we want to keep them and help them when something is wrong and even when they hurt us, we can still care about them.
perhaps you could try to talk to her when the two of you are getting on well. what would it be like to tell her how you feel either by having a conversation with her or by writing her a letter? sometimes friends are not aware of the way they are behaving and the effect 