Rhogam shot

Mo

Has anyone else had miscarriages in the past that were untreated with the shot and then went on to have regular pregnancies? Basically I had two miscarriages that were not treated with the shot somehow and just finding out about it with my third miscarriage this week. And my doctor said the shot may not work. Anyone else have this experience?