You bet your ass, foreigners outside the US have no constitutional rights.
But the Congress is has no power to pass a law respecting the establishment of religion.
Banning a particular religion from future immigration, establishes a religion how?
What part of "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof" is too complicated for you to understand?
What part of foreigners outside the US have no constitutional protections do you not understand? We decide who we allow to immigrate or visit, no foreigner has a constitutional right to come here.