that's right, if the logic of the story demands that a character dies, they should die, not get another asspull power-up or win through plot induced stupidity
if the story has no other good character to shift the focus to, then it's the story's fault, nothing else