7 year old won’t sleep...HELP

Hey everyone, I’m pretty devastatingly desperate at the moment so I’m hoping someone can help.

My 7 year old daughter has sworn off sleep.

It started back in March. She would complain of a sore stomach if she noticed it was near bedtime. I suspected it was a lie because she would be okay ALL day until she checked the clock or I would tell her to go wash up for bed. I took her to the doctor to be sure & after checking her stomach they told me she’s fine, if anything maybe some slight constipation & sent me home with a light stool softener.

And let me add, it would get to the point where I would watch her force herself to vomit just to get my sympathies. Something she learned how to do as a toddler.

But this wasn’t an every night ordeal since it was during the school year and she would get tired out from waking up so early. It’d be mostly on weekends.

Fast forward to now, it IS an every night ordeal. She’s kept me up until 2am a few times. I have a 8 month old so I’m already exhausted as it is. With her fits of crying and screaming and knocking at my door 50 times and coughing trying to force vomit, she always wakes the baby so I get no sleep.

I’m divorced and I thought part of the problem was that at her fathers house he allows her to sleep with him and stay up until 1-2am for fun. You know dads, they have to be the fun house. So I talked to him about it and he also put forth these rules of sleeping alone and sleeping at an early hour. He said she right off the bat pulled the stomach thing with him as well to try and stay up.

We went on vacation recently and since it was vacation we wouldn’t get back to the hotel until around midnight. And despite all the treats, junk food, & anything she wanted, guess what? No stomach aches those nights on vacation. Because she was allowed to stay up.

I’ve taken her to pediatrician who sees no medical issues. She sees a therapist who also sees no medical issues. I’ve disciplined for this behavior with no result. I’ve given her Children’s melatonin per her pediatricians advice. And still NOTHING.

I just need to know if anyone has the magic formula for this behavior. Honestly she’s always been a great kid until this habit and it makes me so disappointed in her.