I suspect that in the case of people being convicted of “terrorist acts” and going to jail for 20 years a judge will be involved.
Judge being involved…yet. There is a lot of flexibility within the INA and its subsequent legal modifications to detain a noncitizen while their case is being heard. My guess is the weakest argument for the government in all of this is that they were actually physically removed from the US prior to their hearing being completed. Their detention is lawful. Where they are detained might have to be remedied by SCOTUS.