Sorry, but they can. Life, liberty and property can be taken away by due process of law.
Removal of Rights as part of a criminal trial's punishments are one thing. A priori restraint of an individual's liberty is something quite else. The first is permitted, the second is verbotten.