Surely, if CBP is under the DHS then it is their role to direct the CBP under United States law. If this is not happening then the only conclusion one can come to is that either the CBP has become a rogue agency, or the DHS has. There is no other way to look at this.
If a department of government is ignoring court orders and following instructions directly from the President in defiance of the courts, they can and should be considered a rogue department and force needs to be used to bring the, under control of US law.
Federal Marshals need to be working here to find out who is making these decisions either within the CBP or DHS, and those people need to be arrested and charged.