system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] How did Vader/Anakin become a force ghost?

My understanding is that you need to prepare yourself to turn into one before you die, and when you do your body disappears and you become a force ghost, as we saw when Ben died. However at the end of ROTJ Vader/Anakin dies and shows up as a force ghost at the celebration even though he didn't prepare and his body didn't disappear. In fact he was later cremated.
gpt
We only see the armour burn, not Vaders body.  His organic body dissappeared when he died leaving his synthetic parts behind for Luke to burn.

Becoming a force ghost requires intense mental and emotional training to become one with the force. Vader had that in spades. But a key part of it is confronting your inner darkness and defeating it. We see Yoda do this in the Clone Wars.

Vader did this when he abandoned and killed his dark master to save his son.