I hate it when gym leaders are like "how did I lose?" or "you've surpassed me!" when you beat them. Maybe it makes sense for the later ones, but for the first 1-3? Really? The "Gym Leaders adjust their difficulty based on the players badges in order to test them" headcanon (Is this supposed to be canon? IDK) is the only way anything even remotely makes sense, so I have no idea why they keep doing this. Yes, you improve at an absurd speed because you're the protagonist, but surpassing the gym leaders in the first few badges is a bit much.
It's worse in Sword and Shield because it's explicitly stated that everyone has to go through the gyms in a set order:
This is the second gym. It's like if your elementary school teacher was like "you've surpassed me" after you do well on a math test. It's pretty easy to fix, so I have no idea why they can't just adopt the "it's a test" explanation. Heck, even in the first gym you get the explanation that Milo doesn't want to go all out against a weaker trainer.
Never Say Lose:
While I don't mind them being surprised they lost; no matter at what "level" they're battling at either against a newb with no Badges or a trainer who has gotten them all they are still the professional Pokemon battler. If anything, losing against a newb even when using a beginner team either means they're off their game or the newb knows their stuff & how to train their Pokemon. Is it cliche? Yeah, but I can understand it in the point of view that this is (one of) the Gym Leader's job. This is also especially notable for Galar Gym Leaders as, when at full power, they're supposed to be equal to Elite Four members. That could better explain Nessa's rather big jump in conclusion, off if you don't know at full strength they're E4 strong, makes sense that it could be forshadowing your Champion Cup battle against her later on.
Also it's always implied the player is an amazing trainer and that, while the battle seemed easy for us, for every other challenger the Gym Leaders are intense fights so us breezing through them makes us look like training prodigies.
Also it could be a combination of things specifically related to Nessa. She is a tad egotistical so she could be exaggerating; like maybe she felt like she was on a win streak and the player suddenly broke it. She's also friends with Sonia who told her about the player (and presumably Hop) as she knows you're the ones who got sponsored by Leon. She said she's specifically itching to fight you so, in theory, could have prepared a team specifically for you (and maybe Hop) to test the Champion's picks... and was just completely blown out of the water how you still defeated her.
Test Or Strength?
I do not believe its ever specifically been said that Gym Leaders use specific teams based on the number of Badges a trainer has. The ONLY instance of this concept in any canon is the anime special Pokemon Origins. In the
first episode, before Red starts his battle with Brock, Brock asks how many Badges does Red have and, upon Red saying he had none, Brock goes over to a tray that contains six Poke Balls but only selects two of them.
Otherwise, it's never really said, only implied because as we get later and later it's the only explanation that makes sense.
Gen I, II, and RS they could get away with the concept of the Pokemon they're using are their only Pokemon as you never re-battle the Gym Leaders. Notably in Gen I you're able to skip around the intended Gym order yet the Gym Leader's level never changes, and in Gen III your father specifically doesn't allow trainers who don't have 3 Badges from challenging him (though that could also be something specific to the player as Norman is your father and may want to battle you when you've grown stronger on your own). But then comes Emerald which lets you re-challenge the Gym Leaders all who reveal they have much stronger teams. What's the explanation for this? Are we supposed to take it as they had these Pokemon all along but train other weaker Pokemon for Gym challenges of certain Badge numbers, or did they all power train until they were as strong as the Elite Four? Also, if we were to take their initial teams and "full power" teams, some Gym Leaders would have used more than 6 Pokemon or missing some.
Gen 4 then brings this issue more to the forefront. In DP, Fantina is participating in Contests so you need to skip the Hearthome Gym and challenge the Veilstone and Pastoria Gyms 3rd and 4th before going back to challenge Hearthome as your 5th. But in Platinum, Fantina is available as your 3rd Gym Battle. And her levels & team composition now are matching that of a 3rd Gym Leader than a 5th. Similarly, Maylene and Crasher Wake are pushed up a position and their teams reflect this. Alternate continuity based on the player's perspective or did they change their teams because th player now had different number of Badges? And of course there's rematches where they suddenly have Elite Four level teams.
Gen 5 is where the implication is on full display (but still never said). More notably in B2W2 than BW, though the only thing I'll say about BW would be that, when Bianca went to get back up against Team Plasma, it would be odd she would go get the Gym Leaders unless the people in-world know that the Gym Leaders do tier the Pokemon they use thus have a "full strength" team. But back to more "solid" evidence, the first being Cheren. We know Cheren has more than a Patrat and Lillipup (not counting Challenge Mode teams). Granted, unlike Blue, he did choose a Type Specialty and become Normal-type so maybe he decided to train a separate "Gym Team"; though later it's revealed he suddenly has a Cinccino.
Burgh, Elesa, Clay, Skyla & Drayden all have replaced one of their Pokemon with a "new" Pokemon; while nothing is canonically off, why don't they also use the Pokemon they suddenly stopped using unless they're required by League rules to only use 3 Pokemon? And of course we have their and all past Gym Leaders Pokemon World Tournament teams showing many have more than just 6 Pokemon.
Only notable thing from Gen 6 is that Korrina doesn't use her Lucario in her Gym Battle for some reason. Similarly, due to how the Island Challenge works, the only Gen 7 "League" trainers you battle at different times is Hala and Olivia. In SM, Hala's E4 Battle just has him picking up two more Pokemon but other than that uses the evos of the Pokemon he had for his Kahuna so nothing off; BUT Olivia in her Kahuna battle uses a Boldore which by her E4 battle is gone (though, funny enough, in USUM she does have a Gigalith in her E4 team but doesn't use the Boldore in her Kahuna battle).
Which of course brings us to now. Gen 8 is all-in on the implication but STILL doesn't say it outright. All Gym Leaders are as tough as E4 members, but when you battle them their Pokemon levels and team composition are based on Badges (or rather what Gym Leader you're up to as Galar is the first League which does say there is a "Gym order" and you cannot skip to the next Gym without beating the previous). Milo and Nessa don't even use their Gigantamax, they Dynamax (which comes with the additional implication that Nessa has two separate Dreadnaw, unless they're applying before and sometime in the middle of the Champion Cup she went over to the Isle or Armor to feed her Dreadnaw some soup).
And in a few days Gen 9 will now be adding a new page to all this. They're letting us challenge the Gyms in any order. How is that going to work? Are we going to see different teams? Will it be the same team but they're composed in a way they fit no matter when you battel them (big DOUBT on this from what we know about one Gym Leader's team)? Will Levels change or there be additional rules which change how Levels work? Or will there be an implied order but, if you want, you can just skip over some (and then come back to completely sweep them later... somehow I don't think this will be the case). And, if there is some kind of team changes based on the order of when the player challenge them, will they finally say that Gym Leaders adjust their teams based on the # of Badges? 7 more days.