Sec. 5. If the court authorizes a child who is under the custody or supervision of the department to be placed in a state institution (as defined in IC 12-7-2-184) for voluntary treatment in accordance with IC 12-26-3, the court may not release the department from obligations of the department to the child until the earlier of:
(1) the date the child is discharged; or
(2) the date that a parent, guardian, or other responsible person approved by the court assumes the obligations.