Let me try a different explanation.
Let's presume you're a heroin addict and the Government provides a methadone clinic. You don't want to be a heroin addict anymore and so you go to the methadone clinic. Then the Government shuts the methadone clinic and removes the service it provides. As a result you accidentally overdose and die.
Is it the Government's responsibility for you not to be a heroin addict? Arguably not. Does the Government have a responsibility to pay for methadone clinics? That's a matter for debate and depends on your political stance. Nobody forced anyone to take heroin in the same way that nobody is forcing anyone to get pregnant (leaving rape aside for the purposes of this discussion) While methadone clinics are legal, lots of people are getting off heroin.
Bodily autonomy (from the state) requires that the state doesn't directly interfere with your body against your will, whether you are pregnant or not is a matter outside of state control. If you ask the state to intervene with your body (as in your example) a refusal to intervene isn't an invasion of your bodily autonomy - because you are already autonomous from the state.
Let's take the reverse example... let's say you were pregnant and the foetus had died in utero and doctors wanted to give you a C-section to save your life and avoid sepsis and you refused because of your own mental health issues. If they knocked you out and performed that C-section to save your life, they would be infringing on your bodily autonomy. In fact, I'd argue to to undertake that procedure, they'd need to go to court, have you declared mentally unfit to make a decision and have their actions pre-agreed by the judge. Jehovah's witnesses turn down medical procedures on the grounds of bodily autonomy all the time up to and including death.
https://www.theguardian.com/uk/2007/nov/05/health.religion
I would suggest, in the example that you gave - that a failure of the medical team to remove a dead baby would count as negligent manslaughter in the event of the death of the mother. I think it wouldn't be an abortion if the baby was dead and this would be reflected in the relevant laws. The complication in law would come if the baby was dying but not dead.