I'm not a US citizen, but was working until recently in the US with a work authorization visa (TN1)
For family reasons I had to go back to my country N (where I am a citizen) and I'm currently working remotely for my employer. Local tax office recently contacted me in my country N, I explained them the situation and by local laws I have to pay now taxes in country N.
My employer, however, does not have a proper setup to pay taxes internationally and most likely don't want to deal with that kind of situation. For simplicity, let's assume my annual salary is $100K and my overall tax is 30%. In my country N, the total tax on $100K salary is roughly 23%. My employer currently withholds all the taxes in the US, but I also will have to pay 23% on the $100K salary in country N.
Will I be able to claim from IRS full refund for all withheld taxes if I wasn't present in the US and paid all taxes in full on the salary in country N (eg I wasn't resident in the US)? If that's possible, can it be done in such a way so I wouldn't need to wait entire year to claim all these taxes back?