Taxes paid twice to NY State and VA

My income for 2021 consisted of 6.5 months of wages from a company located in NY State. After that, I was unemployed. The whole year of 2021 I lived in Virginia telecommuting for 6.5 months.

From my wages, taxes were withheld by New York State. I also paid estimated taxes to the state of Virginia based on the same wages. From which state should I expect a refund, NY State  or VA?