You are talking about something like a bill of attainder, which is something countries that have royal lines can pass, where a person and all his issue can be barred from ascending to the throne. It is against the constitution to pass an attainder in the US.
I don’t think it matters whether the murderer is pregnant or not when she commits the crime. It’s the grandmother’s will that matters. If she dies intestate, then her estate will go to her nearest relative who is not involved in the crime, and I think that probably can’t be a fetus, although as someone said upthread, in states that give fetuses after a certain point (28 weeks gestation, for purposes of murder statutes, or whatever) may allow a fetus to inherit.
However, there’s going to have to be a disinterested trustee; the mother can’t be the trustee. This could end up being a terrible way to try to slip past a disinheritance law by getting control of the money as the child’s guardian.
There was another case that might be on point, though, for which my google-fu is failing me.
A woman’s husband died of cancer. After he was dead, she used sperm they had frozen, to get pregnant, and had his child. Then she applied for Social Security survivor’s benefits for the child. She was denied, on the basis that the child was not a survivor, having not been born when his father died. Survivors benefits are intended to help people caught in a sudden bad situation. If the woman knew she would need them, she should not have had the child, the court reasoned.
So, it might be that in a case where the grandmother dies intestate, the unborn fetus can’t be considered a survivor, and therefore can’t inherit. If there are no survivors who can legally inherit, the state confiscates the estate, and given that the state has an interest in this, it might be what would happen.
If another relative, such as the murdered woman’s sister, or the murderer’s brother, is going to get everything otherwise, and is very motivated to have the fetus “disinherited,” and is going to be in a position to hire a lawyer, and attend the civil litigation, I’ll bet they’ll win.