Is all 1099-G always taxable for any prior year when Itemizing Deductions on Schedule A?

I amended a 2019 return where I paid State income tax well over $40,000 and itemized deductions and then received a refund in 2022 from the state reported on 1099-G for an amount well under the $40,000 I paid in 2019.  Is this refund still taxable, or am I punished for not reporting this properly in the year I filed my income taxes.

 

To make this more clear, the new SALT limit  only allows $10,000 even if you paid a significant amount of money above and beyond that ,$10,000 SALT limit when itemizing on schedule A.  Not only was the $10K limit exceeded for 2021, I well exceeded this amount on my 2022 taxes as well.  Does the IRS put blinders on and see only $10,000 once that tax year is over? If you receive any money back, which would NOT have been taxable in that prior tax year, why is it all of a sudden now taxable?  If I am incorrect, could someone tell me how to calculate the correct Taxable amount for that prior year?  It would seem that you should be protected up to the amount over the $10K that did not qualify as a deduction in that prior year, as it would have been ignored at that time on that prior schedule A.  Am I missing something?