A simple fact is that the U.S. has people with heritage in other countries. Because these countries and people often disagree to the point of war, people within this country will be faced with the decision to either side with their people or the country they live in. I would hope they side with us but that is not always the case so certain measure are needed just in case.
Hypothetically, tho I don't see it happening, what would happen if the U.S. and Mexico went to war? We already have people of Mexican heritage waving the Mexico flag as they riot in the streets over internal differences, how many would take up arms against us should we go to war? Sure, many and I hope most would side with the U.S. but many would also cause as much damage to our society as they could hurting many people of their own heritage in the process. Even the bleeding heart liberals would be faced with the issue of who to trust and are they safe in their own home with potential violent people in their area. How comfortable are non-Hispanics U.S. citizens going to be if they live in various town in California and Texas with high populations of people with Mexican heritage? How comfortable would people in sanctuary cities be when they know that those they had protected are still citizens of a country we are at war with? Clearly, should this unlikely scenario come to pass, the U.S. would have to separate people who may side with our enemy for our protection as well as theirs. After all, if we are at war, many citizens would see them as the enemy and take physical action against them.
Given this country's history of restricting civil rights in response to terrorist attacks, acts of war, etc., I would have to say no. After Pearl Harbor, Japanese Americans on the West Coast were forcibly relocated to internment camps, lost their homes and jobs and suffered psychologically. There was no evidence to suggest any of them were disloyal. And after the 9/11 attacks, many Arabs and Americans of Arab ancestry were imprisoned, held without trial and tortured in ways that put a dark stain on the honor of the US Armed Forces.
It is ridiculous to justify the removal of basic liberties and human rights by saying that it is because we are in war. Human rights and liberties are called RIGHTS because they cannot be taken away from any individual no matter the circumstance. Allowing an institution to strip anyone from their rights without actually committing a crime is ridiculous.