Ash won't go away, but I can see a slow shift coming in his role in the anime.
I think SM and Journeys have shown that Ash doesn't necessarily need to be hogging all the screentime and that other characters can be given the spotlight more frequently without the anime suffering, though I will admit this is from my own experience. I can see Ash's position in the anime essentially going from being THE main character, to sharing the main character position to eventually being a companion for the new main characters, playing a more supportive role.
If Ash becomes the world champion, I can see this accelerating the role shift. Ash won't be dropped if he wins the championship, because he made it very clear in the beginning of Journeys that being a Pokemon Master is a lot more than being a champion, and this extremely vague undefined goal of being the Pokemon Master is a way to keep him on the show no matter how strong or acclaimed he becomes as a trainer. I think him winning the world championship could also lead to a potential first official time skip in the anime, like a year or two, five max. Since he has achieved the goal many have waited for Ash to achieve, is there any reason to keep him as a 10yo anymore? I'm sure media would go pretty wild with Ash finally growing up even if by a year.
If Ash loses the championship, it'll feel pretty weird seeing him go back to another gym badge quest. I assume the next generation anime would probably spice things up with Ash being more known and a minor celebrity, which would be fun to see him figure out how to deal with. But honestly this championship feels like a good way to retire him from doing the same old badge questing, and letting him tackle on his Pokemon Master quest in a new way. But with Ash being such a battle maniac, I'm not sure how that'd pan out. It'd be pretty out of character for him to not want to battle everyone and everything that moves, and not take on any challenge he comes across.