Richard Bauckham (cited in the link I gave) actually addresses this:
The narrative functions performed by verses 1-2 together are two: (1) They introduce three important characters, who enter the Gospel’s narrative at this point, by identifying one of them, Mary, as the woman about whom hearers/readers already know the story of her anointing of Jesus, and the others as her siblings. (2) They distinguish the Bethany where the three reside from the other Bethany in the Fourth Gospel, “Bethany beyond Jordan” (1:28), where Jesus is at this point in the narrative (10:40-42). The knowledge presupposed in the implied readers/hearers by these two functions is knowledge that readers/hearers of Mark have: they know of a woman who anointed Jesus in the Bethany that is near Jerusalem (Mark 14:3-9; cf. 11:1, 11). Readers/hearers of Luke would not have the required knowledge, since it is not the sisters Martha and Mary (Luke 10:38-42, not located in Bethany) of whom readers/hearers of John 11:1-2 are expected to have heard, but a woman who anointed Jesus in Bethany near Jerusalem.
I think the confusion here is because you’re conflating the anointing Jesus received in the house of Simon the Pharisee somewhere during His ministry (Luke) with the one he received in Bethany before His passion (Mark, Matthew, John). Granted, some people do assume that Luke’s account is just an alternate version of the one recorded in the other gospels, but even if we assume ‘Simon the leper’ = ‘Simon the Pharisee’ and ‘woman accused of many sins’ = ‘Mary of Bethany’ (?), it still would not equate to ‘Mary of Bethany’ = ‘Mary of Magdala’.