The border agency faced unfavorable rulings in the case of a lawyer and nurse who had their phones taken by officers without a warrant.