Director Rian Johnson considered including Anakin Skywalker's Force ghost in Star Wars: The Last Jedi. Released in 2016, the film was the middle entry in Disney's Star Wars sequel trilogy, directly picking up from the ending of J.J. Abrams' Star Wars: The Force Awakens. Aside from continuing the journeys of new characters like Rey, Finn, Poe, and Kylo Ren, it also finally revealed what Luke Skywalker had been up to after he went off the grid.
As The Force Awakens was focused on Han Solo, The Last Jedi's story was centered on Luke. The movie took the time to explain why the legendary Jedi walked away from the outside world and how he played into Ben Solo's fall to the dark side to become Kylo Ren. While The Last Jedi was big on forgetting the past and carving a new path for the Star Wars franchise in general, it also featured several nostalgic elements that harkened back to previous movies. And had Johnson move forward with a part of his plan, Anakin would've appeared in his movie.
When asked by a fan on Twitter if there was ever a point in his creative process that he thought of featuring Force ghost Anakin in The Last Jedi, Johnson surprisingly said yes. He went ahead and provided context saying that he considered having Luke's father appear during the tree burning scene in Ahch-To. However, he eventually realized Jedi Master Yoda better fits what the sequence wanted to achieve in of storytelling. Check out his full tweet below:
It's difficult to argue with Johnson's logic here. While Luke is Anakin's son, the pair barely had any connection other than that short moment before the older Skywalker died in Return of the Jedi. For the most part during their interactions, Anakin was Darth Vader, it wasn't until he was redeemed that his former persona returned. While the prequels tackled the slow transition of Anakin to the dark side, Star Wars still treats him as an entirely different character from Darth Vader which makes sense considering how different they were. Overall, while one would be hard-pressed to find anyone who wouldn't be thrilled to see Hayden Christensen return as Anakin, this moment in The Last Jedi just wasn't the right time for it. Had they moved forward with the idea, it would've felt empty, almost like it was done for the sake of fan-service.
That being said, Star Wars: The Last Jedi's justified decision regarding this matter doesn't excuse the Star Wars sequel trilogy's failure to properly incorporate Anakin into its narrative. Granted that Kylo Ren was obsessed with his grandfather and supposedly finishing what he started, the films failed to mention the villain's origin story and eventual redemption in the end. Even Star Wars: The Rise of Skywalker, which was peppered with fan-service moments, only had him through a voice cameo, which wasn't nearly enough considering that he's the central figure in the Skywalker saga. Perhaps Lucasfilm can make amends for this massive missed opportunity in their future projects.
Source: Rian Johnson