I've just tried it out by reducing the number of battle units in a battle.
It turns out that the units are indeed removed from the battle instantly.
If only your unit(s) remain, you're victorious.
If no units remains, you're "defeated".
Your units retreat automatically to the square they came from.
I tested this with a lair, and this did cause something that was unexpected.
All the monsters in the lair came out and stayed on top of their temple.
This was consistent with the lair data which did not contain any monsters anymore!
So this poses the question: what happens to defenders that retreat?
Can they retreat at all? And if so, where do they go to?
Or should we let them stand outside (on top of) their lair?
At first it seems weird, but now that I think about it, it means that from now on forward you can see exactly which units defend the lair, which may be exactly what you want.
It turns out that the units are indeed removed from the battle instantly.
If only your unit(s) remain, you're victorious.
If no units remains, you're "defeated".
Your units retreat automatically to the square they came from.
I tested this with a lair, and this did cause something that was unexpected.
All the monsters in the lair came out and stayed on top of their temple.
This was consistent with the lair data which did not contain any monsters anymore!

So this poses the question: what happens to defenders that retreat?
Can they retreat at all? And if so, where do they go to?
Or should we let them stand outside (on top of) their lair?
At first it seems weird, but now that I think about it, it means that from now on forward you can see exactly which units defend the lair, which may be exactly what you want.
--I like ILSe