In a case such as Bien Dien Phu, I believe that would result in a socrched earth policy on the part of the defenders. I believe there was an episode from the series "Tour of Duty" where a firebase was being over-run, and the soldiers resorted to falling back into a reinforced bunker and incinerating the entire firebase around them, greatly devastating the assault and demoralizing the enemy into abandoning the attack. The next day the choppers showed up and evaced the survivors out of their hole.

Getting out may not be a necessary primary objective, if you can destroy your opponent's will to fight in the process.
_________________________
The ultimate result of shielding men from the effects of folly is to fill the world with fools.
-- Herbert Spencer, English Philosopher (1820-1903)