If the mother has sole physical custody and shares joint legal custody with the father the two never married if the mother dies does custody automatically go to the father?

Does anyone know? we asssume this in happening in the U.S..