So, I know this has been a problem for quite awhile, but I thought I'd had a solution for it, and instead it keeps happening despite my best efforts.
My primary fortress defense strategy (at least in the early years) is to assemble a gauntlet of cage traps to capture invaders and break sieges. This is all fine and dandy until I try to deal with these captives. Well, that's no big deal, right? Just drop them down a little pit onto a weapon trap and problem solved, or so I'd think. Well, I've learned the hard way that apparently dwarves can get frightened just seeing uncaged enemies, even if they're currently being hauled by another dwarf. And, of course, frightened dwarves stop whatever they're doing to run away, including releasing any prisoners they might be transporting at the time. I have lost so many dwarves this way.
Well, that's something I can deal with, right? Just designate the prisoners to be transported to the execution chamber one at a time, and everything should be okay. That way no dwarves will get scared and release their prisoners, right? Wrong. Even doing this, sometimes a prisoner will escape for reasons I have yet to discover. I'm doing my best to limit the damage by surrounding my cage stockpiles with traps to either kill or recapture any escapees, but I'm still winding up with more dead dwarves than I can reasonably sustain.
Now, I can think of ways to overcome this as well - ways that will work and will not require enemies to be transported outside of their cages at all. I could build myself a magma or obsidian trap if I really really have to, for example, but I'd still like to know how these prisoners keep escaping the grasp of my dwarves, and how to prevent it! It's much more fun to drop them onto traps and watch them get bashed to death by spiked green glass balls!