Hi - my name is XXXXX XXXXX I'm a Family Law
litigation attorney. Thanks for your question.
It's likely that your soon to be ex will file a motion for temporary custody and visitation to be established while the divorce is pending and until a final order is entered by the judge.
That's the most likely filing because if there's no court order in place, the judge is not going to order that custody be given up by you. However, if a motion for temporary custody/visitation is filed, the judge will then have to decide what to do based on what is in the child's best interest. Usually, the court considers the current situation of the child, the character of parents, each parent's ability to care for the child/spend time with the child, and any other factors the court deems relevant.
Thus, since you're the parent who currently has custody, you're in the better position in regard to maintaining custody, but it certainly is not guaranteed. Instead, the court will have to evaluate the facts and do what is best for the child.