I mean, just because Nintendo releases their 10th gen system, doesn't mean the Switch will stop selling. Most consoles have a "cross gen" period, to ease the company as they transition, as they most likely won't be able to meet the demand of the Switch 2 for a good year or two.
In that tineframe, either by having a discount, or simply by being a diserable product with new games that almost certainly will be cross gen, the Switch will still be sought after, even if at a slower pace. We are past the system's peak, sales-wise, and while it still selling stupidly well, it doesn't make much sense to wait until the demand for the Switch is completely dried out to only then release their next system, as that will make the transitioning harder(Brand power is stronger now than it would be in that case)
Having said that, I still expect for the Switch 2 to launch at holiday 2023 at the earliest, with 2024 making more sense.