Perhaps there is something else going on here that I am not aware of. Of course, if a mother is deployed in the military on a remote assignment, the natural father would be the likely candidate to have custody of the child during the deployment.
Additionally, just because the mother returns from deployment does not mean that the court must then award primary custody back to her. The court could, and aparently did, take the position that under the circumstances, that the best interest of the child
would be served by allowing the father to continue being the primary physical caretaker of the child. However, the court certainly would allow the mother routine visitation, and I presume that this was done.
The court may be concerned that it would be potentially confusing or disruptive to give the mother primary custody again, just to have to turn around months down the road and return it to the father while your daughter is once again deployed.
I do empathize with what you daughter is going through. If she were to get out of the military I strongly suspect that things would be different, and that she could gain primary custody of her child.
I wish you and your family the best.
Thank you very much for having allowed me to assist you. It would be greatly appreciated if you would click the green Accept icon so that I can receive credit for having assisted you.