The upgrades have replaced vast amounts of the telescope over the years, but I'm not sure you could reasonably have built several new versions and launched those for less than the maintenance costs.
There were five servicing missions (STS-61,82,103,109,125) - the first being to install COSTAR, and you'd *never* have got the budget for an all new system then.
Could we launch something better and cheaper now?
Well - we could launch something new - the F9 fairing is certainly large enough (other rockets exist and have different fairing sizes, I just picked the most common launch vehicle of the moment).
But how much would it cost to build an all new instrument? It would be substantially more than the cost of replacing a few gyros, batteries, and other items with limited life.
If we really wanted to we could even leave a small thruster unit on the base for orbit maintenance.
JWST launch cost ~200 million, but the spacecraft cost multiple billions.
I know - it was more complex, but that's the kind of thing we'd want to to do improve on Hubble. You can launch an awful lot of maintenance missions, upgrading instruments etc, for the cost of a new bird.