It is opined that there are two kinds of high-powered characters in stories – Gary/Mary Sues and superheros… but I would say there are those kinds of characters who do become highly empowered over a believably long span of time. Their power and agency are understandable because of the effort and time that had gone into personal development.
That is the difference between Mary Sue! Rey of The Last Jedi and Luke Skywalker of the Expanded Universe. Some people (cough-Rian Johnson-cough) need to REALLY learn the difference.