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.