Rian Johnson's Star Wars: The Last Jedi is a film that is still being litigated by fans years after it was released and even after it was replaced by a more recent, but no less controversial, entry in the franchise. Whether you loved or hated the film, it certainly had some memorable moments. While it certainly took fan favorite characters to new places, it didn't forget the past, and included the return of some popular parts of trilogies past. And it could have done even more, as Rian Johnson apparently briefly considered the return of Anakin Skywalker in the film.
Rian Johnson responded to some fans on Twitter with some questions about Star Wars: The Last Jedi recently, and one specifically asked him if he had ever considered bringing back Anakin Skywalker as a Force Ghost in the film. As it turns out he did. At one point it seems that the scene that saw the return of Yoda in the film could have been Anakin Skywalker instead, but ultimately Johnson decided bringing Yoda back made more sense.
Rian Johnson explains that he considered bringing back Force Ghost Anakin for the scene where "Jedi Temple" was set on fire. Apparently it was going to be Anakin who did that in this theoretical version of The Last Jedi. But Johnson felt that since there was never really any relationship between Anakin and Luke, the scene would be more of a problem than a solution.
In that regard he's almost certainly right. A scene that played out as the Luke/Yoda scene did would have seemed strange if done between Luke and Anakin. While they may have had a familial connection, they never really knew each other, and there would have been a lot of baggage to unpack between them that would have detracted from the point of the scene.
At the same time, while Yoda was almost certainly the better choice for the scene, using Anakin Skywalker isn't a completely out of left field idea. The scene is about Luke coming to terms with his failures as a Jedi, and there may be no single person in all of Star Wars who understands failure more than the man who became Darth Vader. It would have been interesting to see Anakin Skywalker speak to his son about all that. We could have really received some insight from Anakin himself about his decisions, looking back at everything that happened with a clearer mind. It's a conversation some fans would probably still like to see.
One assumes that Hayden Christensen would have played the Force Ghost Anakin if such a scene had happened. The actor would instead return, in voice only, at the end of Star Wars: The Rise of Skywalker.