Person moves from US to Canada, in April. They are not US Citizen/PR. They pass substantial presence test for US but they also pass tax residency for Canada (as 183 days).
The person kept getting payed via US payroll.
In this case is the person dual resident ? (i.e. 1040 till April, and 1040NR after that?)
Can person claim back all the taxes withheld, social security withheld and medicare withheld ?