I agree with some key differences though. Luke was built up to have been a very gifted pilot, hinting that this was something that Skywalkers had in general hence the death star shenanigans. But that was his only thing and within the given context of the movies it was still within the realm of possibility. Facing Darth Vader and beating him took him years of training despite being very gifted in the force. And before that happened, his first duel against Darth Vader cost him a hand and a near death experience. Personally for a classic adventure sci Fi with a main hero protagonist, this is all fine for the development of a character that you know is gonna win in the end anyway.
The shenanigans with rey is on another level. Rey goes from not believing that the force even exists to mind controlling a stormtrooper in the same movie, a technique that is not only insanely advanced and used by very very few Jedi (only obi wan and qui Gon use it in the main series) but also a technique that you somehow have to know it is possible to do before you use it. How can you go from not believing in the force to mind controlling a storm trooper without anyone telling you about this technique in the first place??? Also how is it possible that the first time Rey touches a lightsaber she is able to defeat Kylo in a duel? Before people bring up his injuries it literally should not matter in their first duel. He should have been so far above her at that point that even with a severe injury he should have wiped the floor with her and set up her growth journey into training and becoming more powerful to face him and greater foes. In addition to that, despite not being a Skywalker, she is also an insanely gifted pilot that can pilot an ancient relic of a ship like the millennium falcon as if it was a road scooter.
Rey did not suffer a single impactful defeat in her trilogy nor did she have a single caveat. She was a completely unrelatable character with a very uninteresting journey and while star wars is a lighthearted and easy to watch sci Fi where the hero always wins in the end and has some Mary sue qualities, it was never as bad as to completely alienate the viewers from the protagonist. And this has everything to do with the writing of the character and nothing to do with the actor or anything else for that matter.
- - - Updated - - -
They are indeed all Mary Sue characters but not nearly on the same level. Read what I wrote above. All this characters faced multiple life changing stakes that make them more human despite their qualities. Obi wan lost his master, his most gifted and beloved student became the strongest sith in the universe and he saw the republic in which he believed in crumble to dust before he sent himself to self exile.
Leia was captured by Darth Vader and was made to watch as her home planet was blown out of existence.