Honestly?
If you want to retain any relationship at all with her you need to take a step back.
You are not behaving like the adult here. You turned up at her doorstep crying and created a melodramatic scene. You called the police fgs. She is, as you say, 13. But she wasn't the one being a drama llama.
She doesn't like your partner, and you know what? She doesn't have to. She's a teenager and she has two parents. Perhaps she'll learn that Dad's isn't the bed of roses she thinks it is, and want to come home, but she won't if you continue to guilt trip her and create a massive conflict with her father and start talking about court.
No court is going to make her live with you, instead of her dad, against her wishes at 13 when he can say what a massive scene you created when she didn't want to come home. You're talking about how you feel and what you want and how stupid and unreasonable she is and how awful your ex, but nowhere in here have you talked, or seemingly thought, about how she feels, or what she needs or wants.
If this is really a storm in a teacup the person who is making it a hurricane here is you. She is not your property and you can't call the police to get her returned. That's not how this works. No court will give a crap what you want, nor what her father wants: all they will care about is what she needs, and yes, wants.
If you want her to want to live with you you need to start by calming things the shit down and thinking about maybe arranging a time to see her, just the two of you, maybe for a meal or a coffee, to talk through why she feels as she does. You need to stop focusing on your feelings and start focusing on your relationship with your DD because if you keep on the way you are, a minor drama in her early teens may become entrenched into a real split and you could lose her.
She may be being ridiculous and unfair and your ex may be awful. I have no idea. I do know that you owe her a massive apology for turning up on the doorstep and putting your emotions on her shoulders - she is the child here, not you - and as for calling the police? Honestly, words fail me.
Start focusing on her, and her needs, and your relationship with her, and start listening to her. And drop, for the love of God, talk of mediation and court. Because you can't win there unless there are safeguarding issues - it will take a long, long time to reach any hearing by which time the established status quo will be her living with her dad... and her pride will be likely to mean that she can't back down, and admit it even if she did want to come back to you.
Try to think about the 13 year old here. Try to remember being that age. You need to be calm, reasonable and sane. I'd pack a bag with a few of her things, not loads, just maybe a couple of weeks worth, plus school bag and work etc, and pop in a card saying you love her and hope she'll call and you can see her when she's ready, and that she always has a home with you. No drama, no guilt trips, just calm and accepting. You need to give her something to miss - not something to make her feel like she doesn't want to deal with your emotions.
You need to be the safe, sane, grown-up in the room. That's your role. When we have kids, it stops being about us and our emotions because they are the ones who are learning to be human, all while being a bundle of hormones on legs. You need to take a step back and reduce the temperature.