When Dak got his deal, it was with the idea that he may be a top 5 quarterback, and you either keep him and pay him, or franchise him and piss him off probably end up losing him in a year or two if he turns out worth keeping. It's an awkward position to be in, but it's the reality of NFL salaries. Most teams would have handled Dak and his contract exactly the same way. It's just the way things are existentially slotted for the most part.
In the end it was kind of a push. We're still not sure about Dak's ceiling, but his salary is also not going to be as high comparatively as the top 10 as young stars start getting their second contract deals. So he's no longer really overpayed, he's about where he should be, a middle of the road starter with several years left, and with time to keep bringing in qb talent hoping to find the next gem, or he gets played out and the team sucks and you have a higher draft pick to take a pot shot with.