For those for a happier ending for the original protagonist of the Star Wars franchise in Luke Skywalker (Mark Hamill) had creator George Lucas had his way, you'd be sadly mistaken. In Episode VIII, which in the current Disney/Lucasfilm canon is The Last Jedi (2017), the Jedi master astral projected himself at the end of the Battle of Crait at the film's climax to confront his former star pupil Kylo Ren (Adam Driver), the former Ben Solo.
The Battle of Crait saw the First Order coming down to try to eradicate the last of the Resistance. After Resistance fighters in their ships destroyed the First Order's siege cannon, Luke appeared in the base to comfort Leia (Carrie Fisher) before they made their escape out the back. The Jedi knight stayed behind to help buy them time. When the confrontation finally did happen after much pomp and circumstance, Luke was revealed to not physically be there. To sell the illusion, he dodged Kylo's blows and strikes in their non-duel. Shortly after Luke's ruse is discovered, we see him meditating on Ahch-To and disappearing from overexerting himself from his excessive use of the Force, "dying" in the process.
Pablo Hidalgo, who works at Lucasfilm, had knowledge of Lucas' original plans revealed them in his latest book "Star Wars: Fascinating Facts: Story, Lore & History From The Greatest Galaxy" (via /Film). He wrote, "years before The Last Jedi began development, the treatment left behind by George Lucas in 2012 also had Episode 8 be the one wherein Luke Skywalker would die."
One other point of contention from The Last Jedi is how Luke became a recluse on the island, rejecting all his Jedi teachings waiting to just die, which isn't far off from Lucas' original vision where he became "a recluse, withdrawn into a very dark space and needs to be drawn back from despair." The only person who seemed to be out of the loop at the time was Hamill himself who thought his character would die in Episode IX, which ended up being The Rise of Skywalker (2019). "I happen to know that George didn't kill Luke until the end of [Episode] 9, after he trained Leia, which is another thread that was never played upon [in The Last Jedi]," Hamill said in 2018. Another difference is Lucas planned to introduce a character named "Taryn", a 14-year old girl, who's similar to Rey (Daisy Ridley) in the sequels, but both were young females destined to be Jedi. Rey is an adult woman than a teenager with angst. "Star Wars: Fascinating Facts" is available in bookstores everywhere.