You need to see her as a different species who reacts in specific animalistic ways.
Very unevolved emotionally - like a scorpion or a hyena.
There is no negotiation, rationale or adaptation capability. They are very limited in their opportunity to grow.
What’s helpful is their predictability - you can find solace in reading up this species behaviours - like narc bingo.
Then you realise it has nothing to do with you whatsoever - a scorpion is going to sting an hyena is going to maul - it’s not ‘if’ it’s ‘when’.
What would you do in the presence of a hyena or scorpion? Keep still, don’t engage, slide away - same thing ‘grey rock’ ‘drop the rope’ - don’t play their games.
Emotionally detach and put in distance from the spectacle. Keep yourself safe emotionally and physically. Get busy filling your life up with healthy people and wonderful rewarding experiences. Don’t allow their antics to get under your skin or preoccupy your mind - don’t do the overthinking which is just a way to keep reliving the horror.
Step right back and step up to look down on the predictable agitation, conniving and lashing out of the crazy animal.
Your only issue / risk is getting too close. I had this with my MIL. My shame is that I tried so hard for so long to gain her approval. I back flipped and tap danced for decades (met my DH at 16) - until one day I thought why am I allowing her to hurt me by handing her the bullets to shoot me with? When I stepped back and stepped up I had the perspective that she had zero friends her whole life and was very difficult and disliked in her workplace. I cringe at the efforts I made to try to bring her joy, include her, etc when all I got back was sneering and undermining.
I stepped away 5 years before she died (I had been clawed by her for 35 years by this point!!) and that is the only way to heal and grow. No drama, no guilt, didn’t look back.