Hi boboon,
Welcome and hello
You're in the right place. There are lots of people here who have experienced the same kind of tumultuous push/pull that you describe.
Her past is very sad, and I can see why it might land right in the bulls eye of your rescue tendencies. It's probably good to recognize that while you can help stabilize her life, you cannot cure her BPD. And stabilizing someone with BPD is counter-intuitive -- the more you appease, the less she will respect you, even if she sets you up to appease her, if that makes sense.
Many of us have had to learn some new communication kung fu that blends compassion and empathy with rock solid boundaries. That, and recognizing the roller coaster of emotional arousal and dysregulation that runs her life (including shame), and how to also take care of ourselves so that we don't become pulp in the relationship, which helps no one.
People with BPD tend to externalize their emotions, so let's try to help you learn to untwist your pretzel
The healthier you are, the more stable and grounded you are, the better for her so she can get grounded after a dysregulation.
Do you notice anything similar about the times she leaves?