Decide which is the less-worse situation for the child: being in a foster home or being in their family home.
I don't know who is making the argument that children should be taken away for failure to be vaccinated. But you can use sticks like forbidding them from enrolling in public school and sending CPS workers for unannounced home visits.
Snowstalker, Harry, and Lurker off the top of my head. There were some others who referred to it as child abuse, which presumably means they would support removal from the home. Actually I got the impression that you held that position from the sick privilege thread, but I see that's not the case.
If CPS, say, came to your house and found knives lying around, unsecured, or loaded guns not locked in a cabinet, or a roaring fire in an open fireplace that a kid could just walk up to, would they ding you for that? Not getting a kid vaccinated seems similar to me. It's a passive neglect. It doesn't mean the kid is going to get a disease, but it's a refusal to take a reasonable precaution against it. Leaving out a loaded gun doesn't mean a kid is going to play with it and kill themselves, but it's a refusal to take a reasonable precaution against such an eventuality.