A federal judge has blocked the US government from repatriating some Guatemalan minors in its custody, citing concerns the Trump administration may be violating their legal and constitutional protections.