Heartbroken mom

Hi, I’m new here and I need help. I’ve been up all night crying and not sure what to do. Please don’t judge.
7 years ago I met and fell in love with my husband. We each had children of our own and ever since we’ve been together, our kids have been our kids. We don’t do step in our home. Our oldest daughter lived with her mom until she was 8, she went through living hell, was neglected, starved, around drugs and all kinds of horrible things. And some bad things happened to her. After a few years we were finally able to get custody of her and her bio mom has been in and out of jail and rehab. We’ve had her for five years and I paid for my husband to get sole custody of her two years ago. During this time, we’ve had her in therapy, a psychologist, switched her schools, bought a house, got her grades up, she is no longer being bullied for going to school smelling like animal feces. And have tried so hard to give her a much better life. Unfortunately the first year we let things she did slide without any form of punishment Bc she’d been through so much. Then she started tormenting her younger siblings to the point they no longer wanted to live with me, has tried to drive a wedge between my husband and I, almost succeeded a few times. After intense therapy and talking to her, things got better. I gave up college to care for her and handle her supervised visitations, took care of every appointment, have gone to every school function, have loved her so hard and spent lots of mommy daughter time with her. Which I never get to do with our other kids. The world seems to revolve around her and if it doesn’t, she acts out. She’s asked me to adopt her and calls me mom. Well she did. Two years ago, she started sexting, blaming other people for her actions, isolating and other things. We switched her therapist, things seemed to get better again. This time she was disciplined and grounded. No physical punishment. 6 months go by and she starts talking to her mom more and goes to stay for court ordered summer visitation. Where she’s staying up all night talking to boys and her bio mom allows her to wear revealing clothing. Then come to find out, bio mom had relapsed and our daughter was caring for bio moms kids while she was nodded out and gone. Cps was called in and she reported everything happening. After months of continued therapy, she admitted to being mean to me and pushing my buttons to see how far she could go. What she could get away with and enjoyed playing my husband and I against each other. We went to family therapy and continued working on everything happening. She will love bomb and act so happy and things will go so good for a while then everything goes crazy and we find out, for months she’d been doing the same things again. (Flashback to when first got custody, she would inappropriately touch my husband, her father, it got to where he was uncomfortable being around her. Therapists said she was learning this behavior from bio mom. And she’s always had an obsession with her dad. The unhealthy kind) fast forward back. Her therapists have said she’s hyper sexual and have taught her inappropriate touch compared to normal. That department has been the only one to seem to stick. But yet she’s still focused on attention seeking behavior and causing problems. After the last incident we took her phone for almost five months. And we thought she was finally realizing self worth and that she deserves so much more than just wanting to be an object for boys. Things go great for a cpl of months. Yesterday she didn’t want to get up for school which is unlike her. She’s now 13. And she loves school. Still gets wonderful grades. But something seemed off. When dad took her phone, we’d discovered that she’s been doing the same things for the last two months. Playing good girl at home and doing family related things. Not any real issues. Only for her to talk bad about me, use me, now sending nudes and talking about sleeping with boys, multiple, not just one. Playing her dad against me again and saying I don’t love her, when I do with everything in me. And I show her. I spend time with her when she lets me, if she’s not on her phone. Talk to her about her bio mom whenever she needs me too, cuddle during movies, get her books to read and we always have carpool karaoke. Teach her things, paint with her. I treat her no different with love as I do my bio kids, I’ve gone out of my way to spend more time with her just to make sure she knows she’s loved. Which she does Bc she tells her therapist that and her closest friends. But now she’s friends with a little girl that has gotten her in to trouble before and she’s back to calling me by my first name, and her actions have escalated big time. Once again, it’s causing issues with my husband and I. I know he feels so guilty about not being able to get her sooner, I know prior to me she had the same issues with a few of his ex’s. And always managed to break them up. I know he has regrets over not disciplining her and he has no idea how to handle this situation. I don’t either. I’ve tried talking to her about loving herself and teaching her self respect, confidence and that if she wants to go into forensics, what she’s doing will end up with her having a baby or something horrible happening to her. I’ve cried and cried trying everything to reach her and help her understand she’s so beautiful and smart. But it’s not working. I’ve been medicated with anti depressants for a while now due to all of this and I don’t know how much more I can take. I don’t know how to help her. I don’t know if I even can, I’ve refused to give up on her but now I’m struggling to breathe. There’s sooooooo much more that has happened and things she’s done, like mashing up smarties and pretending to snort lines of drugs on snap. Being called horrible names in school now and bullied, Bc she flaunts it. I’m so lost. Please help. Please please please. Idk what to do and I feel my family falling apart.