Maryland will have jurisdiction of the matter up to six months after she leaves the state. The court will determine if she must return. A temporary hearing may be required to resolve that issue. I strongly recommend you find local counsel and file to legalize the child and to obtain custody/visitation as soon as possible. It is logistically better to file and serve her before she leaves the state.