Xbox could just stop making consoles and still be in gaming.
Windows PCs are their lead dev platform. Game Pass is their core now and thats on PC too. Plus XCloud for smartphones, browsers, smart TVs. All various ways to sell GP via streaming. Then they could even try to put GP on PS5 and or Switch.
Unlike Sony or Nintendo, Xbox have built a clear exit strategy if they were to stop making consoles. Moving all games to PC, streaming to phones, Game Pass, etc. Even their new console silicon is designed for cloud servers too, so if they did want to stop making consoles, they can still keep using that chip in servers for many years.
It probably won't happen, but who knows.