If a court denies a petition for adoption, it shall dismiss the proceeding and issue an appropriate order for the legal and physical custody of the minor. If the reason for the denial is that a consent or relinquishment is revoked or set aside pursuant to section 2-408 or 2-409 of this title, the court shall determine the minor's custody according to the criteria stated in those sections. If the petition for adoption is denied for any other reason, the court shall determine the minor's custody according to the best interests of the minor.
15A V.S.A. § 3-704