As near as I can tell Whitworth signed a contract that extended to 2023 but had a zero salary for that season. Teams do that to spread the cap hit for signing bonuses over a longer period, which naturally has the effect of lowering the cap hit each year.
I know this isn't what Whitworth signed, but just to illustrate what I mean.
Suppose he signed a 3-year deal in 2020 for $30M with an $8M signing bonus and salaries of $6M, $7M, and $9M. The cap hits would look like this:
2020 $8.67M cap hit ($6M salary plus $2.67M pro-rated signing bonus)
2021 $9.67M cap hit ($7M salary plus $2.67M pro-rated signing bonus)
2022 $11.67M cap hit ($9M salary plus $2.67M pro-rated signing bonus)
Now, if they added a 4th year with zero salary the cap hit for the signing bonus gets spread over 4 years like so:
2020 $8M cap hit ($6M salary plus $2M pro-rated signing bonus)
2021 $9M cap hit ($7M salary plus $2M pro-rated signing bonus)
2022 $11M cap hit ($9M salary plus $2M pro-rated signing bonus)
2023 $2M cap hit (zero salary plus $2M pro-rated signing bonus)
It's the same total cap hit ($30M), just distributed differently. And when he retires after the 2022 season that $2M goes against the 2023 cap. All money that a team actually pays a player has to go against that team's cap, and I don't think there's a way around that.
But if 2023 did have a salary attached to it that amount would be voided. And since that money would never be paid out it wouldn't have to be applied to the cap. Perhaps that was what you were thinking of?
AlbaNY_Ram