OP, please realise that your ex did not leave because of your daughter. He left because he's an irresponsible man child and very likely a narcissist.
Normal men dont up and leave a serious relationship where there are children involved and move in with another woman a few weeks later. He needs narcissistic supply which is why he moved on so quickly and I can almost guarantee this women was already on the scene well before you broke up.
Narcissists like to create disagreements between their victims (you) and the people who can see through the mask (your daughter). He has likely done something to make your daughter feel so strongly about this that she gave you an ultimatum.
You need to ask your daughter why she felt this way instead of seeing it as he left because of her. He would have left anyway, regardless of what your daughter did. You need to validate her feelings and apologise that you allowed an abusive man to come into your home and cloud your judgement.
Please know I am not judging you, I have been in this situation (although we didnt live together) and regret terribly not listening to my teenage son earlier (he said he didnt like my ex but couldn't articulate why- truth is he could see what an idiot he was as he wasnt clouded by feelings of 'love' like I was)
This probably was a toxic relationship and there will likely be alot you haven't shared on this post but I'd recommend you read up on narcissistic abuse.
The sooner you realise this, the sooner you can prevent it from happening again and heal your relationship with your DD. She loves you and has your best interests at heart and you need to always put her feelings before that of a man. I know that's hard to hear but it's very important to understand and accept to have an abusive free, happy life with your DC in the future. They are more important than any man, any relationship and any feelings you have for someone.
You are likely very vulnerable to further abusive relationships right now and you should focus on healing yourself and your DC 