Excuse me while I laugh at one corner, the only way the entire anime ends is when the Pokémon company announced that they wont be producing anymore game ( not gonna happen when it a literal cash cow) and announce that it will be the last Pokémon anime to be produce and aired or for some reason the company go under and the whole franchise ends. IT NOT GOING TO END before the game.
There is a counter argument to that, though. Actually, there are a few.
The main counter argument is that they don't need to air a weekly anime anymore. They can still create animated content, but they can deliver it directly to audiences now without having to worry about TV Networks. Pokemon has been been doing a lot more of this with Twilight Wings, Hisuian Snow, and PokeToons.
And one of the benefits of this is that they can release these videos in English and Japanese at the same time to reach a larger audience. This also ties in better with the ways the games are released now. One drawback of the current anime is that it no longer fits how Pokemon games are released. The delay for Western audiences worked when games were released in Japan first, but that changed with Gen 6.
As I said before, prove me wrong JN132.
The series isn't ending JN132.