I think it's Ash's rather tragic designation to be support for other people instead of getting his own dreams realised. If anything it feels like he's more driven by altruism than showing off his own talents (notice the competence difference between class activities and most of the climaxes in SM).
Like you said, one of the more clever elements of the AF arc was it looking like he was completely stealing Lillie's thunder by having Nebby and being 'the chosen one', only for her to take central stage during the last half and Ash to largely turn into emotional support and extra resources for her story.
I think the problem with both arcs (and several other villain ones) is the insistence on having the villain go out in a very flashy (and one sided) bang that kinda negates all the work beforehand and often undermines the character that's supposed to be in centre stage (eg. Ash getting Pikachuinium Z out of nowhere, Zygarde transforming and showing they could have decimated the Megalith with their left pinky easily the whole time), rather than continuing to focus on that team work being the element that stops them. Temple of the Sea had a similar issue, I didn't mind Ash protecting May and trying to do things himself, but I feel like a better climax would have been him exhausting himself activating the temple and May taking over to stop the villain's last getaway, instead of the ridiculous 'super sayian Ash' coming out of nowhere and decimating him, meaning Ash pretty much stole the whole show.
It's a shame because these are all villain arcs that actually managed to give personal involvement to one of the main characters (or in XY's case at least, an ascended spin off character).