Although green-card applicants with expired visas can be detained under federal law, previous administrations did not consider them to be in the country unlawfully.
I have been sounding this alarm for years now. A huge portion of Green card holders and naturalized citizens have technically overstayed a visa while awaiting change of status processing. I don't know what the exact number is, but I'd wager it's potentially a significant majority, considering how long the process takes. Previously it has been a long standing policy that you will get amnesty as long as the paperwork is filed in time, but there is not law that requires it.
If they want, they could use this exact same "loophole" to start mass de-naturalization as well.

