There are in-universe loop mechanics so anyone that dies within a loop, comes back next loop if there is one. In bs 1, mary sue just resets the story. In bs 2 that role falls to GG (the avatar of mary sue's power).
For bs 1, the only deaths that matter are the ones on the way to D end since that is the ending that leads to bs 2, which only really includes baphomet and prayer master (everyone else isn't important or a fairy tale)
For bs 2, there is no loop after H end (it takes you back to the title screen instead of the library, unlike every other ending). Anyone that canonically died on the way to H end is most likely permanently dead. Which means basically just Mabel's avatar (doesn't matter), Prince of Hell (doesn't matter), and GG. Any other character could have technically lived somehow or "died" off screen, not to mention it's kind of hard to actually kill an outer one and not just one of its fragments or whatever you want to call them.