You may be able to leave but the child may need to remain. Once the child is deemed in need of care the child comes into the custody of the state. If your goal is to get the child back in your custody then you need to do what ever child protective services says in order for that to happen.
Every situation is different and you should consult your own attorney to go over all the particular facts in your case. The answer given is only intended to provide general guidance regarding rights and responsibilities.
Sign up to receive a 3-part series of useful information and advice about child custody law.