honestly.. In universe answer maybe that the defiant class was a limited production run, maybe a few hundred maybe less, and they might have had a high attrition rate during the dominion war, so a good number may have been destroyed.
The remaining may have remained in service for 5-10 years after, but Starfleet is not a military, and a dedicated warship wouldn't be needed, plus, the design wasn't streamlined, so for example, like early Jet aircraft, there time in service was probably limited due to better designs being made. Could a number be in a "Boneyard" mothballed and recalled if something happned? maybe, but after 30 years, I doubt the class would be in active service, except maybe as a system patrol ship in a frontier region or unstable border.
Now a newer class that was made that has a design lineage.. sure. They will always need border patrol, quick response fleet etc. so the roll of the ship still exists in a way.
But, the guy who made the Tng Hd Enterprise D did make a Defiant, so there is a high quality defiant out in the wild they can use.