I don’t think Anakin should have become a ghost at the end. Vader was confused when Obi-Wan became a ghost, so how could Vader possibly become a ghost himself?
Vader was confused when Obi-Wan’s body vanished, he never actually saw Ben as a ghost or seemed to know it was possible. In ESB he says Obi Wan can no longer help Luke.
I’ve long presumed Ben and Yoda helped Anakin with becoming a ghost.
Where were you in '77?