Yeah, it's up to the players. I consider this scenario a lot worse than a nice and clean TPK.Say the adventure you're running is a bit too tough for the players & their PCs. In a battle, 2/3 or 4/5 are killed, and the survivors flee, leaving the bodies of their companions. What now?
What happened several times when I was the DM: Rather than taking their chance to flee the survivors continue the hopeless battle because, they, too, felt that a TPK is preferable.
But I've also had campaigns that continued even though only a single pc survived an encounter. Interest in the campaign definitely declined after the incident, though (and soon after it fizzled and died).