If a petition for adoption under this Part III of this subtitle is contested, a juvenile court shall dismiss the petition.