In a proceeding for a grant of custodial responsibility pursuant to this Article, the following rules apply:
(1) A prior judicial order designating custodial responsibility in the event of deployment is binding on the court unless the circumstances meet the requirements of law of this state other than this chapter for modifying a judicial order regarding custodial responsibility.
(2) The court shall enforce a prior written agreement between the parents for designating custodial responsibility in the event of deployment, including an agreement executed under Article 2, unless the court finds that the agreement is contrary to the best interest of the child.