I could argue it's not just comedy but also being emotive AND being taken out of the formula and his comfort zone far more often. As mentioned SM Ash relies on the battling formula way less than other incarnations and they are more liable to play an episode with him all the way through instead of using the usual short cuts like Team Rocket, COTDs or DEMs, meaning he is granted more opportunities to hold a story on his own, giving him versatility and character agency. Some of the usual cheap elements still exist here and there (eg. plot armour moments or being 'the chosen one' to the legendaries) but they don't overtake his actual involvement as a character, which I sometimes felt with other versions of Ash.
That extra whimsy and expressiveness definitely does help, though I do see what some fans mean when it could be toned down a little (but not completely). And I do love when a clownish hero proves to have WAY more depth and competence than what is expected (I think there's a better contrast between him and Gladion than with Alain for this reason). Comedy isn't the whole solution however, just substance to it, some of the other cast members in SM don't do nearly as well after all.