Those rights also apply to everyone who is on US soil, regardless of if they’re even here legally or not!
If they didn’t, they could just arbitrarily decide anyone doesn’t count for whatever reason (which is what they’re fucking doing and it’s illegal AF!!).
It is YOUR DUTY to not obey orders as such. Detainees are to go before a court. There is no exception. Abandon your post before disappearing someone.