That requires an intention to use them first against that invading nation.
Just think of how many Indian and Pakistani lives have been saved because the two countries stepped back when shit was about to get real. Like, three times now. All because of nukes. Unless one of them truly commits to invading and losing millions of lives, their wars are guaranteed to peter out as border skirmishes.