In my view, likely that any 27" iMac would be a similar price to Mini + Studio Display. The Studio Display will out last 2 or 3 Mac Minis - that changes the cost calculation. and, of course, it is easy to upgrade to a Mac Studio if you outgrow the Mini.
The biggest issue with discontinued 27" iMacs is that you have paid a lot of money to have a great screen. In a year or two, the 27" will be unsupported by macOS as well as not having features which will be available in macOS 15 onwards. What do you do with the 27" iMac then?
No the Mini + Studio Display (or a decent 4K 27") is a much better deal.
Hmm, I'm not sure how much longer an Apple Studio Display would last versus an iMac display. I've had this iMac for 7 years and it's experiencing the typical
image retention that all HiDPI displays from Apple appear to invariably experience after several years of ownership.
If I had a 27-inch Apple Studio Display with the same issue after seven years, I wouldn't exactly consider a Mac mini or Mac Studio with an Apple Studio Display a much better deal since I'd still be faced with a situation where I'd be forced to replace the display to get rid of the problem. Once image retention starts to develop on a display, it only gets worse over time.
Much to the demise of computer manufacturers who would love customers to upgrade their computer every few years, they are easily lasting 7 years or more. Apple, mysteriously, cannot find a single supplier that can produce a large screen display without image retention appearing within a few years of ownership.
I am not convinced that a 27-inch Apple Studio Display with a high-end Mac mini or Mac Studio configuration would last much longer than a high-end 27-inch iMac configuration. I weighed the options and all I could see from Apple's current line up is poor value, so I upgraded my 2017 iMac instead of replacing it. I will wait a few more years. If Apple does not offer a replacement 27-inch or 30-inch iMac by the time macOS 13 stops receives security updates, then I will buy an Intel or AMD system and switch to a Debian-based distribution.
I am willing to pay more than I did in 2017 because many years have passed, but the price still has to be reasonable. Apple's current strategy is, in my opinion, not reasonable. You have to buy everything separately, and even taking into account changes in inflation and advancements in technology, you are spending substantially more in real terms because they desperately want to increase the profit margin on their Mac business.
Apple should try to innovate instead of discontinuing products and increasing prices. They spend a fortune on R&D and the best they came up with, for iMac customers, is a 24-inch screen in different colours with no useful I/O.