The premise is legally incoherent. A state is a sovereign geopolitical entity, not a living person capable of pregnancy, movement, or childbirth. Therefore, the hypothetical—"a state runs away to Mexico, has a baby, returns at 18 with the baby"—has no basis in law. Legal frameworks govern natural persons and corporate entities, not abstract political territories as actors in family-law scenarios.
If the question intended to ask about a minor (person) who leaves state custody/jurisdiction, gives birth abroad, and returns at age 18, that would involve immigration, family law, and child welfare statutes—but the phrasing "a state" makes the query unanswerable as posed.