Hmm, did you document her banging on the windows and doors? (I would have recorded her intrusion into your home's environment and surroundings, that is definitely extreme behavior.) What did the police say about her coming to your home/residence uninvited and causing a scene? (I'm assuming she does not have possession or legal access to your residence?) Have you set a boundary - recognized in the order - that she is not to enter your property or approach your residence or building?
Perhaps even amend the court order to state that exchanges (including deliveries of 'forgotten' items or other excuses) must be at a neutral location such as a nearby police station or restaurant. Each parent's home should be a 'safe' place free from disturbance for that parent and children.
Police decided as they wanted to go home, they should. I haven't seen or heard from them since.
I recall when my ex and I had disagreements on exchanges or whatever that my police never forced us to do anything if the children's safety wasn't at risk. For example, a few times she refused to go to the ordered exchange location and later showed up at my home with police in tow. I agreed once or twice but finally I set my foot down and said "No, she didn't come pick up child where ordered and so after the exchange window ended or when the daycare closed I took him home. Sorry, I'll keep him." Officers looked at us both and said we should work it out for the sake of the kids and then concluded as he/she left, "Fix this in court."
So my question is, Did the officers say you were
required to let the kids go during your parenting time?
Or were the officers just trying to defuse the immediate incident? (That's my guess but check with your lawyer. Your Ex was manipulating the children and that's not right nor fair. Of course, court won't care what's fair or not.
So find out if you would have gotten in trouble legally if you would have declined to send them away with mother. I suspect not, but check locally to be sure.) If you don't know, then find out. If it was your court ordered time then it was your parenting time, kids don't get to choose. I learned that lesson in court, children don't get to choose what are essentially adult matters and adult decisions.
This has happened once. Since it worked for her, she'll probably do it again. So prepare yourself for the next time.
Boundaries. Set your boundary - concept: your home is your home and my home is my home and you don't approach my home - and try to get that amended into the order.
This has been said many times so I don't know if there is an original quote to cite, but I remember from the original Star Trek series the starship Enterprise's engineer Scotty finally exclaimed to those on the Bridge, speaking of the Klingons trying to keep luring the Enterprise away from Captain Kirk and the landing party with a second false distress signal, "Fool me once, shame on you. Fool me twice, shame on me!"
Also, ponder ways to reduce confrontations. You could take the kids for a weekend to see their grandparents or other friends or relatives, like a weekend vacation with them. If you're not home and the kids are safely with you, how is she able to create a scene? This won't work for every weekend, but at least sometimes. (Be careful the order doesn't prohibit you from traveling on your parenting time.)