Yes, your employer’s location may affect your US Tax Return.
When it comes to where your employer is located, their location and the location of where your payments come from do not affect your Foreign Earned Income Exclusion (FEIE) or Foreign Tax Credit.
However, you may need to have your W2 adjusted if your employer is a US entity to ensure your tax withholding is correct.
In order to qualify for the FEIE, you must have earnings for your work performed and your tax home must be in a foreign country.
In order to receive the Foreign Tax Credit benefit, you have to pay a higher income tax rate in the country outside the US than the rate of your US income tax.
When it comes to social security, the location of your employer does actually have an effect when it comes to social security taxes.
In general, you’ll continue to be covered by the US social security system when working for a US employer, even if you’re performing work outside the US. This will vary depending on tax treaties and will be considered by your accountant.