YouTuber Literature Devil provided an excellent definition of what a Mary Sue is: a character who breaks the rules of their universe. Since Rey is constantly being brought up, I'll use her as an example. In Star Wars, it is shown Jedi/Sith/Force users need to train hard to learn to use their powers. Even Anakin, the Chosen One, needed to train for years to reach the level he did. Luke didn't have much training, but he did have some (though not enough to defeat Darth Vader without succumbing to his anger.) Rey did none of that. JJ Abrams tried to cover this up in the intro to movie 9, but failed.
The others are just not interesting characters. They never need to struggle; their "struggles" are just mild annoyances which they exact disproportionate revenge for. There is not "heroine's journey" for them. They never suffer loss or setbacks, so their victories feel unearned and cheap. And that's not factoring in the fact they exist solely as mouthpieces for the writers' ideology; people go to movies to be entertained, not lectured.
Furthermore, just because a character is built to be wish fulfillment does not make them a Mary Sue by default, as Blobbo insists with Luke. For myself and countless other kids, Luke was indeed wish fulfillment, and why wouldn't he be? He was a simple farm boy that came from humble beginnings that got swept up in a star-hopping adventure, using cool laser swords and flying spaceships, eventually helping to save the day.
The difference between Luke and MaRey Sue is that, like you said, Luke didn't break the rules of the Star Wars universe. Yeah, it's pretty crazy that he went from flying his T-16 shooting womp rats back home to blowing up the Death Star, but it makes sense logically. He already had experience with piloting spacecraft, and I believe it was even a point in the EU that the X-wing and T-16 had similar cockpits, adding to his familiarity. Thematically, it was also a turning point in the story when he trusted in the power of the Force to allow him to do something that no targeting computer ever could, and it was a hint of things to come. Also, frankly, Lucas didn't know how successful the movie would be, so it makes sense to have what might be the only Star Wars end with a bang.
And that's the most noteworthy aspect of his first adventure. Much of the movie is a lot more low-key, with Luke taking his first clumsy steps into learning about the Jedi, as well as infiltrating the Death Star, rescuing the princess, and escaping. He doesn't display any special abilities, making that final scene where he trusts ghost Obi-Wan's advice hit all the harder. The rest of the trilogy is Luke learning more about the ways of the Jedi, training his mind and body, and even then he still almost dies trying to save his father. It's a long and challenging road he takes, but that's what makes his eventual triumph all the more satisfying.
Now let's swap to Rey. At the start of TFA, she's literally nothing more than a scavenger with barely anything to her name besides a stupid-looking landspeeder. I could potentially buy that she's a skilled amateur with a staff, possibly from needing to fight off other unsavory characters, though none of those conflicts ever happened on-screen to display a need to develop those skills. But then within minutes she's jumping into the conveniently placed Millennium Falcon and flying it perfectly in seconds. When and where would she have had the opportunity to learn how to do this? Uh, the Force, sure, why not.
Then she learns the Force is real, which apparently was lost knowledge somehow in the last twenty years? I dunno, seems a pretty short time for apparently the entire galaxy at large to forget a pretty key thing, but whatever. Once again, in a matter of hours from learning this fact, she can do Jedi mind tricks flawlessly without any training whatsoever and use telekinesis without issue. Why? Uh, the will of the Force dictates something something.
Same thing with the lightsaber duel. Finn attempts to fight Kylo after he shoves Rey into a tree (in like the only instance of her actually getting hurt in these movies), but only manages to get one hit in before he gets completely incapacitated. Then Rey just magics the sword into her hand and flawlessly duels an experienced swordsman. How? Uh, she's got the
heart of the cards Force, I guess, shut up and stop asking questions.
And that's just the first movie. Things only get worse from there, and no amount of retcons can change that ("see, that's why she's so powerful, because
Palpatine was behind it all!"). If anything, they only add to the pile of evidence that she's a Mary Sue. It's why the Disney Trilogy is so unsatisfying, or one reason of many, anyway. When your protagonist is already a flawless superhero that can do no wrong, what meaningful character progression can there be? The ending is a foregone conclusion.
But hey, what sort of criticism do you expect from a moron that thinks TLJ is a love letter to Star Wars fans and Rian Johnson wasn't just taking a massive shit on everything because he's a pretentious fuck that's too far up his own ass?