When the hero’s sacrifice costs them their life, but doesn’t necessarily mean they die
Loki (MCU) - In the season 2 finale, he becomes the one who remains, and a God of Time of sorts. This means he must sit there for eternity maintaining the branched timelines, ensuring they don’t die off, allowing people to have their free will. Although, obviously this means he won’t ever see his friends again. He’ll be alone, forever.
Tav (Baldurs Gate 3) - In some endings, Tav can free Orpheus, but in doing so will cause The Emperor to leave them. But they still need a Mind Flayer to defeat the Netherbrain. So Tav has the option to sacrifice their body (and soul) to become a Mind Flayer and gain the ability to defeat the Netherbrain
Love this trope, but I can’t think of any other times it’s been done. I think it’s hard to get a character to sacrifice their life without making them die in the process.