Hi @Ndiayef ,
Normally, the US will have a tax treaty with a foreign country. Pretty much, the treaty will outline how you pay taxes. Often, they will have a tie breaker clause. As such, you will use the clause to file your tax return in either or country but not both country.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"