The answer in a word: according to legal precedent.
One thing that is traditionally consistent in abortion laws is that they tend to be lenient on women in regards to punishment. There are multiple reasons for this. The first is that in order to determine that an unjustified killing has taken place for the purposes of prosecuting at the level of murder you must legally demonstrate beyond a reasonable doubt that (1) the unborn human was alive, (2) that the mother deliberately participated in an action intended to end that life, and (3) that the life ended by virtue of that action. You can imagine how difficult that would be to accomplish. Given that difficulty it was virtually unheard of to prosecute abortion in the same manner that murder was prosecuted.
Second, the emotional condition of the women was often taken into consideration. As much as this seems to annoy some feminists, it is not unusual for emotional considerations to enter into the sentencing deliberations in criminal law. Third, a jury of their peers is not likely to relish the opportunity of sending women to prison for reasons associated with both the first and second issues along with others. Fourth, the prosecution was much more interested in punishing the doctors performing illegal abortions than the women, so they fostered a legal relationship that encouraged women to trust them (the prosecutors) rather than fear them.
Considerations like these contributed to less severe punishments routinely being sought by prosecutors against women in pre-Roe/Doe America. It is not hard to imagine that any legislators attempting to craft new restrictive laws would proceed by examining these types of reasonings.
In Canada, infanticide is punished with up to five years in prison. Often, the sentence is lower.
Personally, I think we should focus on punishing abortionists and abortion pill traffickers.