I don't think the mechanism for this matters much. There's enough in the story where Oda could flesh out either possibility without much of an issue.
Better question would be to ask what yourself would Oda have Luffy do after his dream is realized? Is this a character you can imagine just chilling around for years on end like Rayleigh or Mihawk? Or carrying out a "secret mission" like Shanks? I don't think either of those suits his style and the latter would probably imply some kind of failure to realize his dream by EoS.
So unless the story starts bringing in the topic of a new adventure after the Grand Line (moon/space/whatever), I think he'll have no reason to stick around. You can do this same exercise with each and every Straw Hat to sniff out the death flags.
For example:
Sanji - the natural follow-up after finding the All Blue is to start a new restaurant and continue feeding the world. This character is 100% not dying.
Usopp - could go either way depending on how his dream is realized. Could get immortalized as a living or dead legend. In the former case, probably just spreads tales of his adventures.
Zoro - can easily keep busy by getting drunk, chilling, and defending his new title. It's not air-tight, though, because he does have that "live hard, die hard" mindset like Luffy.
Franky - was lifelong tinkerer before the Straw Hats, could easily go back to that after them.
etc