Conncticut Double Taxing Previous Job's Income in Massachusetts

Hi,

I worked in MA for the first few months of 2022 and then changed to a job in CT, but I moved to NY so I am filing a CT 1040NR/PY as a non-resident. I found that CT would tax my previous job's income because I cannot deduct out-of-state income from total AGI. I cannot get tax credit paid to MA either because that is for part-year residents only. Is there a way to avoid double taxing? Thanks a lot!

Best,

Ben