Do we still use the penny farthing, biplanes or small black and white TVs? No tech moves on and improves, getters better.
Same with ships, we know they change in design in a short space of time. Look at the Enterprise D versus the Enterprise E. In what 25 years the designs advanced.
Maybe if they were celebrating first contact day it could have been some sort of museum display. But it was clearly a dry dock building ships on Mars, but even that was the exact same dry dock as the one used in Discovery.
Things like docks (and dry docks) are major capitol investments, they'll be refitted internally and given new equipment repeatedly but possibly not changed materially on the external facing for potentially hundreds of years unless they're damaged, why would you retire something that might have taken a decade or more to build when you can maintain and upgrade it gradually cheaply and easily
It'll be like a lot of the old industrial buildings and facilities we have today, where the external might not have changed much (except for things like logo's and paint) in 50-100+ years, but internally the building might have been refitted multiple times.
Even modern shipyards don't change much from one decade to the next, the equipment used might change (but not necessarily as much as you'd think for a lot of it), but the basic shape and structure not so much and there are ship builders who are still using sites that were built 100+ years ago, they just can't use them for the biggest ships any more, but might be building a 25 metre ship using the latest technology where originally they might have been building a ship the same size using wood or metal and rivets.
Given the dry dock in Star Trek is primarily a structure to hold the parts of a ship in place during construction, provide an anchor point relative to the ship for fixed equipment, and things like offices, crew quarters and recreation/emergency facilities for those staff there is little reason for it to change much externally for hundreds of years, as the equipment can be upgraded, and the only real reason to change it would be if you wanted to build something too big for it, in which case you'd likely build another larger one, but keep the existing one so that you could still build and do refurbishments to your existing ships.
Remember the primary thing a dry dock does, is give you a place to work on the ship that's not going to change much regardless of the ship design itself as even during construction/work on the same ship you're going to be making changes to the supports (moving them around, changing anchor points) so the dock has to be flexible in it's use, which means that as long it's big enough it's not going to change much in general shape/look over it's life.
There is also a point at which the technology won't improve enough to make certain changes necessary, for example equipment to move stuff around is unlikely to change significantly once you've got choice of using magnetic grapples, bolt on hold points, or tractor beams you're unlikely to need to change a lot of the more visible parts of the structure (some shipyards the only obvious change in 100 years from a distance might be the cranes/large auxiliary equipment that was either bought in to replace using human power, or updated), if the density of the material increases you can potentially build it using smaller sub-assemblies to keep the mass within capabilities.
Another example would be the likes of aircraft and submarine hangers in the real world, you look at them today and often they're identical to how they looked 50+ years ago, because everything that has changed is housed inside, there are hangers in use today housing, building and maintaining modern aircraft that were originally constructed to house blimps in WW1 or 2, or things like biplanes and spitfires and the only external difference might be that the original single pane wooden frame windows have been replaced with UPVC double glazing (you can't see the way the work benches might have been upgraded from basic wood and metalworking tools to precision milling equipment, rapid prototyping gear etc).
One of the things Star Trek has never done (from memory) is really show anything much of the industry/background of the Federation, at most you've got a few scenes of the odd official facility, or generic space station on the outskirts but never really anything in regards to the sheer number of facilities they'd need to maintain their fleet, or even just churn out the large numbers of small craft (let alone munitions) that they seem to go through.
Basically what I'm saying is.
The dry docks are effectively shells, as long as it's big enough physically you wouldn't replace it if it could be kept up to date cheaper than building a new one, especially as by the time you've built a new one it's likely to be slightly out of date
We-e-e-ell...playing devils advocate for a second, some stuff in Trek just seems to hang around a long time. The Excelsior class was introduced in STIII (2286) and is still being used in DS9 (late 2360s, early 2370s). The Miranda class (Reliant in STII, 2285) was still around to be cannon fodder in the Dominion War (early 2370s). And let us not forget the everlasting Klingon battlecruiser, the D7 - in the Trek timeline first seen in an Enterprise episode set in the 2150s*, still out marauding around the galaxy more than 100 years later, and the later variant (the K'T'Inga, three of them got blitzed by V'Ger at the start of the first film) also lasted about a century.
I guess the in-universe explanation is that often as technology is developed it can be stuffed into the older hulls without changing the exterior appearance. The only time you need to do that is for significant wholesale updates - NCC-1701 between TOS and TMP for example. Newer hull designs will be more capable, but older ships can be brought close to the state of the art by refitting.
* - this was actually a complete stuff-up. There was a proposed design prepared that was much more fitting for the time period, but at the 11th hour the showrunners wanted changes made to it. Trouble was, no-one was in any fit state to do any more work to it because of the hours they'd done already. The only CGI model that was ready to go at the time it was required was a D7 one (actually, a K'T'Inga variant) used for an episode of Voyager. But nevertheless it was shown prominently on-screen, and is therefore canon. Hey ho.
This.
When you consider in the real world there are airframes still flying routinely that are 75 years old, and even things like fighter aircraft are frequently flying for 25-30 years or longer with various refits to the engines, avionics and equipment during that time.
There are people out there who have rebuilt classic cars to be electric without affecting the external look, or all the people who do things like camper conversions, let alone the companies that specialise in taking a standard vehicle and modifying it to a completely different use.
IIRC there are a huge number of ships in use today that are decades old and have changed usage repeatedly so they've been everything from passenger ships, to medical ships, ferries, floating casinos etc as long as the hull is intact everything else can be modernised or updated if there is the will, or a need, even steam trains often lasted 50+ years and multiple roles, as for example near me they have a narrow guage musuem and some of their units were in use continuously for 40-50 years starting off in the UK on industrial sites (quarries, shipyards etc), then things like getting refitted for use in WW1 (I think one of theirs was armoured and used to ferry supplies near the trenches), brought back to the UK for a while, sold on to the likes of India when IC trucks became more common/affordable here, and run for however long.
The same thing happens a lot with other industrial "plant", it's used until it's either completely superseded, or it breaks down in such a way that you can no longer get the parts that need replacement, no one knows how to repair it (neither of those are really applicable to a civilisation where they can replicate things, and routinely produce highly complex parts on a standard ship), or it's significantly cheaper to replace it than repair it even allowing for the time it'll take to get the new one up and running with the operators trained in it's use.
I do wonder a bit at times if people don't realise how long a life a lot of our industrial equipment and infrastructure has when they're surprised that something in a science fiction show might be in use for decades/hundreds of years, especially when you think that the likes of the Federation are likely to both be building everything to a far better standard than we are, and maintaining it (and when they're building stuff like star ships, they'll be massively over engineered because they don't want them breaking down and killing everyone on board on a regular basis).