But I hope you would agree that it is better to buy something in a system which is being actively developed vs something in a discontinued system
I categorically do not agree with that statement. Sometimes it is "better". Sometimes it is not.
If gear from a system recently removed from a manufacturer's catalog that still qualifies for warranty/repair work meets a buyers needs at a much lower cost than the brightest, shiniest, expensive new products then I think the better choice is the older system. I've cameras and lenses from the EOS EF system that have not been produced in well over a decade. They all still work as well as when they were new and are sometimes as good a choice as any of my newer gear for many use cases.
One of my most used lenses to this day is the EF 24-70mm f/2.8 L discontinued in 2012. Is it as clinically sharp as the 2012 replacement EF 24-70mm f/2.8 L II? No, it isn't. But unless you've got the later on a camera mounted on a tripod using mirror lockup and wired cable release you can rarely tell the difference in real world usage. The difference in resolution between the two, assuming both are in proper optical alignment, is less than what you lose shooting handheld in medium or marginal light.
Probably my second most used lens is an EF 70-200mm f/2.8 L IS II bought in 2010. It was discontinued in 2018. I had the IS unit replaced in 2019 when it began to vibrate in certain orientations with respect to gravity. The repair cost around $400 from CPS. Today it's as sharp, maybe even slightly sharper, than when it was brand new over 15 years ago. And it's sharper than the RF 70-200mm f/2.8 L IS according to most online tests I've seen. It isn't as light or as compact when zoomed out to 70mm as the newer RF model, but that's never bothered me.