Rod Dreher & Daniel Larison discuss the intersection of religion and patriotism. The issue of course isn’t adherence to a higher law vs. the nation-state; even those without explicitly religious motivations can reject loyalty to a state whose actions they feel to be illegitimate. Rather, the bigger issue are multiple loyalties. Religion is an incredible ideological and institutional system for transcending boundaries of nationality, but the inverse of that is that religious minorities have long been under suspicion. During the Persian-Byzantine wars of the early 7th century Jews notably sided with Persians and exacted revenge for 6th century persecutions in the Levant upon the previously dominant Christians. This was a rational act by a religious minority who aligned with the power which had a history of greater tolerance toward their faith, the Zoroastrian Sassanians.
But the relevance of multiple loyalties varies from group to group. There is for example one majority-Jewish nation. And there are only two majority-Hindu nations. There is only one Cuba. By contrast, there are ~1.5 billion Muslims scattered across the World Island. One reason Islam has bloody borders with other civilizations likely has to do with the fact that it has many borders, period. This means that Muslim populations are likely to be faced with a test of loyalty far more often than Hindu populations, or Sikh populations.