Nothing in this Chapter shall deprive any person of the benefits of relief by habeas corpus. If the court issuing the order of habeas corpus grants relief, a copy of the order shall be sent to the court which entered the order of admission and the clerk of the court shall file the order in the court record.
405 ILCS 5/3-905