Buddhism and universalist forms of Christianity are hypocritical religions if they don't crack down hard on nationalism and divisions within the faithful.
Let's look at two examples:
Catholicism claims that it considers the right to migrate to be roughly as important as the right of nations to secure their borders, and while the Catholic church does call for mercy for immigrants it has not gone nearly as far in cracking down on Catholic nativists as it has on other positions that cause suffering for instance abortion. The Pope tomorrow could easily make a dent in Christian nationalism by declaring that all Catholics must support permissive labor immigration unless they can prove it hurts the community of believers or the species as a whole and excommunicating any Catholic who deports or impoverishes a fellow Catholic.
Buddhism, in theory at least, goes even further in trying to break down not only nationalism but the illusion of the self, family, and tribe. However, many deeply Buddhist countries have maintained extremely strict migration policies - including towards other Buddhists. Splitting the Buddhist community is generally considered one of the worst violations in Buddhism and is a direct road to Avici, the worst part of Buddhist hell, yet many/most Buddhist regimes do attempt to divide their followers by citizenship or birthplace.