Yeah, and I tried to keep that somewhat vague in my last draft: “Leia knew you shared the same struggle as her.” So she doesn’t know Rey is linked to Palpatine, but knows that she is going through the same thing that led her to abandon her own Jedi path, so she’s showing as much love and support as she can. Maybe this could be worded better as: “Leia knew you shared a similar struggle to her.” And again, Luke is only voicing Rey’s own concerns by saying “Because you’re a Palpatine?” he’s not directly confirming anything.
We already know the scene works without Leia knowing something about Rey. We’d at least get Leia dealing with the same problems as Rey in the flashback, so we can relate that to why she took such a liking to training Rey. I dunno, I’m just spit-balling here. Because in the end I want to make it clear none of them truly are Palpatines, they just need to make the choice to reject the visions and Palpatine’s claim over them.