The XY series came at the heels of Best Wishes, which contained one of the worst portrayals of Ash Ketchum as both a trainer and a character. The reset button was not working, and it only fed to the perception of Ash being a loser. So what was the solution to all of this? You give Ash skinner clothes and Red's hat. And already, when I saw that XY design, I knew it was something special.
2013 was also the year that Pokémon Origins came out. The miniseries that supposedly was better than the main anime with "darker" themes and "better trainer" Red and "more epic battles with no stock backgrounds". A combination of BW 10 Year Old Dumb Ash, "edgy" Red's fandom, and Ash's more mature XY design... That was the perfect storm for XY to forever redefine Ash.
And I do believe it Ash's portrayal in SM and JN can be traced back to Ash's portrayal in XY. Or rather, how he is meant to be perceived by other characters.
Prior to XY, Ash always been the get-no-respect trainer from OS to BW. He's berated for being an immature kid or a poor trainer. His achievements gets laughed off even if it's good (Max comes into mind). And every time he goes to a new region, there's always an attempt to soft-reset him and Pikachu. Best Wishes is the straw that broke the camel's back considering how people loathed Iris for calling Ash "Such a kid" and gave no respect to Trip.
In contrast, XY Ash was given admiration and role model treatment from his peers and if they had not heard his exploits before, they will soon. Ash himself hasn't really changed in terms of personality, but it only shows us that his core personality isn't the problem. It's actually endearing and the reason why people still follow Ash after all this time (even through BW). What has changed is the people's attitude towards him. By making Ash into a famous trainer and role model, the postive qualities of Ash are emphasized far more than the negative qualities (which was more common when people berat Ash) and thus Ash ends up appearing mature, cool and badass without resorting to have Red's stoic and serious personality. This perception is why the Kalos League hurt a lot for many fans because XY was the first series where Ash was finally getting the respect he deserved. And thus the Kalos League would be the nail on the coffin of "Ash is a Loser" memes.
Consequently, because of XY, every series took great care of ensure that no matter what changes or comedy may be made to the show, Ash will always remain a badass trainer that everyone looks up to.