Gross oversimplification-there's no actual time limit-it focuses more on discernible intent.. In any case, the lprs affected by Trump's EO don't fall into this category. They had no intent to abandon lpr status but were abroad on temporary visits to relatives. This order refused them admission solely on the basis of national origin. Unlike an NIV applicant, certain constitutional protections extend to lprs. If Trump hadn't back-tracked on the lpr issue, they would've certainly sued, and they would have had a very strong case.
Not my point at all. I was agreeing with, and adding to this:
A green card does not guarantee they can remain in the U.S. Crimes as well as security matters can (and do) lead to removal.
In addition, there is no guarantee that an American citizen, born or naturalized, won't visit family in one of the listed countries, become radicalized, and then return to the US with intent to commit terrorist acts.
However, unlike legal permanent residents, naturalized American citizens at least go through a vetting/screening process, are questioned about any past/present ties to terrorist groups, are tested in the English language, are tested in American history and government, and have to take an Oath of Allegiance before they are granted American citizenship.
This too is no guarantee, but it goes much much further than a legal permanent resident returning from one of the listed countries.