Yeah but I happen to agree with Hal that Leia piecing together her lineage is insanely dumb. The only way it makes sense is in the context of the novelization where she was already having frequent conversations with Luke’s voice so it’s not a stretch to imagine that he told her - and he knows because he’s omniscient now or something.
Personally, I’d be fine with Luke saying “Because you’re a Palpatine? I had told Leia about it.” But Hal said he doesn’t like the idea of ghosts having that much power over things. I’d push back against that with the fact that it was Obi-Wan’s ghost who all but tells Luke that Leia is his sister so it’s not unprecedented whatsoever. Then again, Obi Wan knew that secret in life, but that’s a mild distinction.