That's exactly what I predicted the problem was, but I see nothing wrong with either side's stance.
If I was Jerry, I would only want to offer 3 years because if he failed to succeed again, then it would be around the time that Dak could be cut without any major salary cap issues.
If I was McCarthy, I would want 5 years because he knows that might be his last head coach contract so he wants to make sure he maximizes.
I think McCarthy's mistake was thinking other teams wanted to hire him which made him think he had more leverage than he really had.
In hindsight, I bet McCarthy wishes he had taken the 3 year deal, but he will likely get another head coaching job in the NFL or college in 2026 so it likely won't matter to him then.