I'd say RS3 is still a good lot of years away from being in maintenance mode. It's still updated regularly (1-2 content drops a month) and while the player base has declined over time the game is still bringing in good revenue for Jagex. Hard to predict what will happen 10-20 years in the future as technology/game industry changes rapidly but in the medium-long term I don't think the game is going anywhere.
RuneScape 3 could easily keep going another 5–10 years, maybe more. Jagex still supports it actively with new content and events, and there's a loyal player base that prefers RS3 over OSRS. As long as the monetization holds up and the community stays engaged, there's no hard reason it would shut down anytime soon.