A. In cases where a child has been committed to the Department of Health and Hospitals, office of behavioral health, or private mental institution, or an institution for persons with mental illness, the court may also modify the judgment on motion of the department or superintendent of a private mental institution.B. In cases in which a child has been adjudicated a delinquent, a judgment of disposition shall not be modified to release a child from the custody of the Department of Health and Hospitals, office of behavioral health, or private mental institution or an institution for persons with mental illness without three days prior notice to the district attorney and the department or other institution.C. Notwithstanding any provisions of law to the contrary, in cases in which a child has not been adjudicated a delinquent and has been found to be insane at the time of the offense, a child shall not be released from the custody of the Department of Health and Hospitals, office of behavioral health, or private mental institution, or an institution for persons with mental illness except upon order of the court after motion and contradictory hearing.