Generally speaking, no the other parent cannot do that. If the other parent is successful that would only be because the residential situation regarding your child is unusually complex. In most situations, the states are bound the Uniform Child Custody Jurisdiction and Enforcement Act. This is a uniform set of laws adopted by 48 states and the District of Columbia. The UCCJEA harmonizes the laws among the states to ensure that parents cannot shop around to different state laws in order to get the best child custody order.
The UCCJEA ensures that a court will only rule on a child custody matter if the moving parent is able to show that the child meets one of a series of conditions. These conditions are listed in order of importance. If a particular condition does not apply, the court will move onto the next one.
First the court will ascertain if it is the home state of the child. The child's home state is wherever the child lived in the previous six months prior to filing the paperwork.
If that condition is not meant, then the court will look into the child's life. It will measure the number of personal and familial connections the child has with the state. The more friends and family, the more likely the court will rule that it can determine the child custody matter.
If neither of those conditions are met and the parent and child are fleeing a domestic violence situation, the court will assert jurisdiction. The courts do not punish parents for extricating themselves from dangerous and toxic situations.
Finally, the court will decide the case if it is proved that no other state can meet any of the three tests.
Remember that this analysis only allows the court to make a ruling, it does not mean that the court will rule in your favor. This is merely the first hurdle before the court can decide the substantive issues. If you are engaged in a child custody dispute then you may want to speak to an attorney. You don't need to try and handle this yourself, there are professionals who can lend a hand.