According to George Lucas, it really did all end at Endor
At least for The Emperor.
In an interview with Digital Spy at the Rise Of Skywalker premiere, Ian McDiarmid, who returned to portray the character in the film, said that Lucas told him that Palpatine definitively dies on the Death Star while they were shooting Return of The Jedi together.
“…when we did Return of the Jedi, and I was thrown down that chute to Galactic Hell, [he was dead]. And I said, ‘Oh, does he come back?’ And [George] said, ‘No, he’s dead.’ “
Not All That Dies is Really Dead
Bringing the character back was somewhat of a necessity on the part of J.J. Abrams.
After Rian Johnson killed off Snoke in The Last Jedi, Abrams no longer had the main villain to work with that he thought he was going to have after he wrote and directed The Force Awakens.
Desperate times call for desperate measures, so he brought back Palpaltine despite not only McDiarmid thinking he was dead, but the entire fan base as well.
More Star Wars Revisionist History?
Even though Lucas said Palpatine was dead at the end of Return of The Jedi, let’s remember that Lucas is notorious for constantly changing his mind and rewriting history to suit what works for him at the moment.
Lucas also said that Star Wars is a 9 film series, then after he finished the prequels said there was never going to be a sequel trilogy because Star Wars is about the fall and redemption of Darth Vader. Then a few years later reversed on all that and started working on a sequel trilogy before selling Star Wars to Disney.
Plus, The Emperor did come back under Lucas’ watch in the extended universe, and he also did not have a problem with Darth Maul being cut in two and coming back as 1/2 spider for The Clone Wars, so take what you want from him telling McDiarmid that Palpatine was dead as a doornail.
I’m pretty sure everyone reading this could come up with their own long list of changes Lucas swore were always his original intent vs. what actually happened behind the scenes.