That’s not the point, because Anakin has before appeared to Luke. Anakin is the one who knows about the Wayfinders and Exegol, and has used them in the current run of Darth Vader comics. So, when Luke was searching for the Wayfinders to find Exegol, there’s no reason Anakin’s Ghost shouldn’t have told him, or that Luke wouldn’t have asked.
It’s just sloppy writing in TRoS, not a big deal and something we just have to live with… but there’s no real logic to fix it without reshooting the movie.