Hal 9000 said:
Quick idea: paint out the droids during the birthing of Luke and Leia.
It’s the only time R2 and Yoda share a room, and gives some additional ‘plausible deniability’ to R2 about the finer details of Luke’s family tree.
Alternatively, you could have Bail wipe both of their memories by slightly changing his line to, “Have the…droids’ mind[s] wiped.” Maybe just cut to an insert of R2 to hide the dialogue change, cut to 3PO and replace R2’s laughing beeps with sad beeps. R2 has seen just as much as 3PO, and they can pull those memories out of either of them, so why not wipe them both and solve the problem that way?