The law (actually, I understand it is a decades-old court settlement) says migrant minors cannot be jailed. That, of course, causes a practical problem - the adult caregiver couldn't be jailed without separating the child. So, until recently, families crossing the border seeking asylum were typically released together into the U.S. pending a hearing on their asylum claim.
Now the Trump administration has a "zero-tolerance" policy that indeed incarcerates the adults - and, by operation of law, causes the kids to be separated. So this is a change in enforcement, not a change in the law - although the law's restrictions were probably the main reason previous administrations didn't jail adults as frequently as the Trump administration does.
The Dems, of course, would much rather seize on the optics of the situation for political purposes than change the law and permit parent and child to be confined together. I suppose one solution might be to give arriving families a choice - waive their right to an asylum hearing in exchange for a plane ticket back home, or move forward with the asylum claim with the knowledge that parent and child will be separated until the claim can be heard.
Or change the law. But that's the last thing the Dems want.