The Simon who hosted Jesus at the dinner recorded in Luke where Mary anointed Jesus' feet is the same Simon who had formerly been a leper as recorded in the accounts of Matthew and Mark. This fact adds to his guilt in not being understanding of Mary's actions, for he himself had been a great sinner whom Jesus had cleansed and healed of his leprosy--and it was his spiritual blindness on this point that prompted the response of Jesus we see recorded in Luke.
Notice Simon's own words (thoughts) at that dinner:
Now when the Pharisee which had bidden him saw it, he spake within
himself, saying, This man, if he were a prophet, would have known who
and what manner of woman this is that toucheth him: for she is a
sinner. (Luke 7:39, KJV)
Consider: How did Simon know what Mary had done?
Simon had been healed, but Mary had been forgiven. Jesus admonished Simon gently, after Judas, who had started the criticism of Mary which Simon afterward reflected, had left. This he did in the form of a parable of two forgiven debtors (as recorded in Luke's account), asking which one would love the creditor most. Simon answered correctly, but still, as a proud Pharisee, was unable to see himself as he truly was. He considered himself to be far greater than Mary, and seeing how Jesus had accepted her devotions, his respect of Jesus had been lessened.
There is considerable congruity among the several accounts of this event. Two of them specify that Simon had been a leper, and the third, addressing him as a Pharisee, still names him as Simon.
Now when Jesus was in Bethany, in the house of Simon the leper,
(Matthew 26:6, KJV)
And being in Bethany in the house of Simon the leper, as he sat at
meat, there came a woman having an alabaster box of ointment of
spikenard very precious; and she brake the box, and poured it on his
head. (Mark 14:3, KJV)
And he turned to the woman, and said unto Simon, Seest thou this
woman? I entered into thine house, thou gavest me no water for my
feet: but she hath washed my feet with tears, and wiped them with the
hairs of her head. (Luke 7:44, KJV)
All three mention the alabaster box (and these are the ONLY mentions of an alabaster box in the entire Bible), which, in all three, contained ointment.
There came unto him a woman having an alabaster box of very
precious ointment, and poured it on his head, as he sat at meat.
(Matthew 26:7, KJV)
And being in Bethany in the house of Simon the leper, as he sat at
meat, there came a woman having an alabaster box of ointment of
spikenard very precious; and she brake the box, and poured it on his
head. (Mark 14:3, KJV)
And, behold, a woman in the city, which was a sinner, when she knew
that Jesus sat at meat in the Pharisee's house, brought an alabaster
box of ointment, (Luke 7:37, KJV)
The alabaster box alone gives strong evidence to the story all being one and the same. Were it not the same, there would have been two separate occasions when a woman and/or Mary had anointed Jesus' feet with ointment. But if this had been the case, there is no indication of it in the Gospels. And why would such an occurrence have taken place twice under virtually the same circumstances and in the house of a man of the same name?
Matthew focuses on Judas' accusations of Mary's wasteful extravagance.
Mark goes further in stating a possible price of that extravagance.
Luke focuses on the Pharisee's unjustified pride, yet without shaming him as a former leper, or mentioning the specifics of his guilt. (It's worth pondering the fact that at the time these accounts were written, their subjects were most probably yet alive.)
Conclusion
The evidence is undeniably strong in support of the three separate accounts pointing to the same event. As is usual with stories found in the Gospels, each account of the same event may be presented with the unique focus of that particular writer.