Your guards on the roof give a Huzzah! Huzzah! They turn to the scaling buccaneers, and fire crossbows and ballista down at them knocking a few to their deaths! Sandara and Maggie look at one another and grab up Isabella, and drag her corpse to the parapet, holding her up over the side they ladies call down, "Your Captain is Dead! Retreat! Surrender! We have bested you!"
Seeing Inkskin dead the enemy pirates turn to flee. Your guards show them little mercy however and fire into them as they repel down the wall and flee to their ships. Out in the bay you can see the enemy ship, the Thresher, turn, and flee out into open waters the moment they realize that the pirates are fleeing and are scattered. Someone on that ship has a spyglass focused in on the corpse of Isabella being held up and displayed as a trophy, and that's enough for them.
Gragol and Royster press out of the door now, and cut down a few more men, then begin rounding up prisoner and captives. The fight, finally, is over.