That isn't really what happens. The unit would just surrender. That's how it went down in WWII early in the pacific campaign. Western nations don't go down to the last man.
The fighting helped blunt the PVA Spring Offensive and the actions of the 2 PPCLI and 3 RAR at Kapyong were critical in preventing a breakthrough against the UN central front, the encirclement of US forces in Korea, which were at that point in general retreat, and ultimately, the capture of Seoul.
[0] https://en.wikipedia.org/wiki/Battle_of_Kapyong#Canadian_2_P...
This may be true but we want any adversary to think that we will! We at least ought to be all able and willing to do so. I hope our generals and military command know better but I want them to have multiple options and I want any adversary to have to think twice before breaching our shores.