This does not happen because the RBCs from the baby and the mom never mix. However, the Rh factor, another blood antigen, is different. It is in the plasma, not attached to the RBCs, so if the mom is Rh-, meaning that she does not have this antigen in her blood, and the baby is Rh+, there can be problems like this because the Rh antigens of the baby will trigger a full-blown antibody immune response from mother to baby. We have injections of gamma globulins now that are administered at the end of each pregnancy to inhibit the mother's body from making these antigens, but it is often complicated for an Rh- woman married to an Rh+ man to have successful pregnancies.
If the mom is Rh+ and the baby is Rh-, there is no problem because the baby's blood does not contain a protein antigen which is foreign to the mother.
It's Mother's Day here in the US, so it seemed appropriate to discuss why it's good that RBCs can't leave the mother or baby and enter each other's blood streams. What a mess that would be, with 4 different possible blood groupings!