I had this with my DD. It is normal teenager behaviour when they want to do things before they’ve had enough experience to know how to handle things safely. But I didn’t have an off hand ex, making things more difficult.
When my DD was in sixth form and about 17, the things I worried about for her were drugs, drinking and boys. I tried to let her know that it was her safety I cared about not stopping her having fun. But that it’s very easy to get into difficult situations without meaning to at that age.
I didn’t give her carte blanche and still wanted to know where she was going, who she was with, plans to get home, and giving her money for an emergency taxi.
We had a deal that if ever things went pear-shaped and she felt unsafe, she could call whatever the time and I would come and get her. There would be no questions asked at the time. The next day we could discuss what had gone wrong, how she could keep herself safe next time etc.
She was very mature for her age but also headstrong. Iam sure she did stuff behind my back, but she’s over 20 now with a good job and a steady boyfriend.
As another poster said, if you’ve brought them up well, then the values they learnt from you as a child, become that small voice in their head - that hopefully keeps them out of harm.