I'll just call her shit out:
When she acts out like that, it's because you had the upper hand. You did something she couldn't control, so she's trying to take power from you and get you back under her control.
I'd bet money she controls with approval as well. If she's happy with you, it's because you're doing something she approves of.
You are not a bit player in The Grand Drama of Her Life. You are not the antagonist who exists only to highlight that she is the protagonist/hero/sacrificing martyr. And you do not exist to be her personal audience--she's clearly giving a performance.
Ignore that shit. Then wait for the next tactic when she realizes this one didn't work.
Does she ever get physically abusive? Do you have a safe place to go if she escalates?
EDIT: I am in a righteous mode today. Please forgive me for jumping into your life and defining things I know little to nothing about. Usually I practice much better boundaries and speak more circumspectly. Anything you disagree with that I ever say, dump it! I hope for your well-being and safety, and I hope you have the internal and external support to get through your current challenges.