If father and child an US citizen and illegal mother is deported What happen to the child?

The child is an American citizen if the child was born on American soil. The child should be able to stay in the US with the father. Unless the mother takes the child with her. There could be a custody dispute between the mother and father, it should be what is best for the child.