This is why I said there are circumstances in which cravingcheese, not that it was an absolute right. There are limits on the bodily autonomy of anyone who lives in a society.
However, when another human being is inside your body, you do have a right to do things that might have a lifelong detrimental impact on them. There is no alternative, not least because of the range of behaviours you'd have to police. It wouldn't just be a question of sending pregnant women to prison if they smoke or drink, though given the poor outcomes for the children of incarcerated women you might well be making things worse for the baby anyway. There'd need to be way more.
For example, if you have HIV or actually quite a few STIs, this can be very dangerous. Testing is offered at booking in, but a woman might have unprotected sex with a new partner thereafter. So no shagging allowed, on pain of... what? The air pollution in some areas is, I read this week, equivalent to smoking 10 cigarettes a day. We all know how bad that can be for a foetus. So once you POAS, tough shit if you happen to live in Scunthorpe, or London. Off to the countryside with you. Some essential medication poses risks to the foetus too, some of it serious. Now, a pregnant woman who cannot stay living and/or healthy without something that could harm the bodily health of someone else gets to make that choice alongside treating clinicians. Without that choice, then what?
And if this is really about the welfare of a baby, then you need to think about how you stop women doing these harmful things. Not just the ones you disapprove of more.