Even after a suspect has been to court, the Fourth Amendment to the U.S. Constitution applies to a claim that the authorities are illegally holding the suspect. The U.S. Supreme Court confirmed this rule with the case Manuel v. City of Joliet. (580 U. S. ____ (2017).)
The Manuel case involved a claim that a defendant had been kept in jail after a judge relied upon falsified evidence to allow his continued detention. The Supreme Court said that the Fourth Amendment continued to apply to the case even after there had been this kind judicial review of the defendant’s arrest.
For more detail on the ruling, see our article covering Manuel v. City of Joliet.