That's a real issue. If you're on a student visa, and were planning on coming back in the fall, leaving the US for the summer may be a bad move. Entry to the US can be denied arbitrarily. Deporting someone is harder.
They've got a deportation order, so somebody is being put on a plane to El Salvador. Whether the name of the person being deported matches the name on the deportation order is another question, but not one ICE seems bothered by anymore
Sure, I was locked up by DHS/immigration, and I am a US citizen. CBP/ICE/HSI doesn't really need much of anything to lock you up, when they did it to me they told me I wasn't even under arrest.
IANAL but there are different categories like "detained" [reasonable suspicion, for questioning] and "arrested" [probable cause], and that's why the common advice is to just ask "am I free to go", which doesn't get bogged-down on finer-grained distinctions about why you might no be.