(Note: although inspired by the recent russian invasion of Ukraine, this question is NOT about this specific war but the general case. Here any thoughts about outcome is purely speculation and therefore OT in the scope of this question.)
Given a situation where one country is threatened or attacked by another country, where the defenders may be able to resist but not without heavy losses (including civilian and infrastructure)
Given the choice of (basically) unconditional surrender and prolonged resistance against an increasingly brutal campaign, are there any studies that show that one course of action is "better" than the other throughout history? (the definition of "better" being up to the study).