The Bible is clear

so why are some confused?

The alien who resides with you shall be to you as the citizen among you; you shall love the alien as yourself, for you were aliens in the land of Egypt: I am the Lord your God.

Leviticus 19:34

You shall also love the stranger, for you were strangers in the land of Egypt.

Deuteronomy 10:19

‘Cursed is anyone who withholds justice from the foreigner, the fatherless or the widow.’ Then all the people shall say, ‘Amen!’

Deuteronomy 27:19