That isn't a fair account of the situation. The 49ers will have to account for $34,106,669 of dead money over the next 2 seasons regardless of what they decide to do with Williams. If they keep Williams or cut him with a post June 1st designation they'll account for $13,281,665 of dead money in 2026 and the remaining $20,825,004 in 2027. If they cut him without the designation they have to account for all of it in 2026.
The 49ers decision is purely about Williams pay for 2026. Williams is due $33.06M. If they think he's worth close to that figure and they're desperate not to lose him then they'll retain him with the overpay. If they think he's worth closer to $25M they'll cut him before the $10M roster bonus guarantees and then compete for his signature with him as a FA.
If Williams is going to accept a significant pay cut he'd like the opportunity to talk terms with other teams before he makes a decision. However, cutting Williams with or without a post June 1st designation would mean the 49ers have a lot less 2026 cap space with which to re-sign him. Letting Williams talk to other teams before the 49ers make a final cut/keep decision makes the most sense.