If they are suspected of some other crime, detain them for that, fine. But no masked goons accosting people because they claim they suspected their immigration status.
>If someone is here long enough to obtain a state id, there's no reason to detain them on suspicion of their status having expired
It seems like you believe that if somebody had been long enough in a state to obtain a state id then their status in the country is legal forever. In the few states where I've got id it took about a month to get an id - you need to lease some housing and get two bills. But even if it took 50 years to get a state id it would not change anything - a state id is not a proof of legal status in the country. Immigration officers can detain people on reasonable suspicion, which is the same standard that is needed for a traffic stop.
I guess I believe that we should remove the discretion that you believe the officers have...
In CA, as an LPR you can get a REAL ID, but its expiry is not the default of the REAL ID (like not "5/10 years from issuance of the underlying document like a driver's license" but is "if your LPR expires 2 years from now, then your REAL ID driver's licence also expires two years from now"). So it's only really an accurate statement if there's subsequent status changes to pre-empt the LPR status.
In WA, as I am, as an LPR I cannot get a REAL ID. WA will only issue to citizens.