For a bit of perspective on this, we've always known there is a lower threshold than probable cause for immigration-related stops as the lawdogs spent hours telling VAPA, years ago. This low? Maybe not.
And, the reason ethnicity is prohibited for criminal stops is that ethnicity is an invidious (extremely unfair) indicator of criminality or criminal activity in most cases, the exception being when the suspect has been identified as someone of a particular ethnicity.
But, ethnicity is kind of an unavoidable criterion when it comes to immigration.
Also, legally, immigration/removal/deportation is not criminal so the protections against unreasonable search and seizure are lower because the prosecution apparatus is not triggered. I think that should be rethought, though, and it's not whether the criminal apparatus is invoked, but whether the government seeks to detain whether civilly, or criminally, or otherwise. THAT is the deprivation of liberty we're concerned with. not whether a criminal proceeding is invoked, because the net result is the same.
That's not to say that I agree with any of this shit, but there are a lot of historical SCOTUS, including liberal ones, that would have come to a similar "conclusion."