I have some empathy with this, as my little brother was the same, and ended up going to live with our grandparents and then into a home from about 15.
The bottom line is he is a result of very very bad parenting when he was young, I am three years older so came out better as the mistreatment and neglect started at this stage, but he was effectively neglected as a baby on. As their dramas, their love lives, their whatever took precedent and cruelty slipped in. Details of which i won't go into. I'm not saying this is what happened when your daughter was young, simply that's what happened to him.
I always remember my grandfather saying to my father "he is what you made him" and I believe that absolutely and utterly to be true. My father didn't accept it.
However, my brother is now 43 and he will not change, he's violent, abusive, been to jail for drug dealing and is I think an alcoholic. No one is in contact with him. My father tried and tried, but there came a time when it was too much, too violent, too far. As much as I thoroughly blame my father and myself am also no contact with my dad, I do understand why he had to end their relationship.he was scared of his own son.
There comes a time as adults we have to take responsibility for ourselves, and stop blaming our parents. If we are unable to functional normally, even if it's because our parents fucked us up, then sadly in some instances you have to walk away as you'll never win the war.
If she cannot stop the abuse, I think uou need to end the relationship and both accept your share of the blame.