Class b strep

Lil Queen
So my doctor says i have class b strep in my urine so i need to take antibiotics, which i hear isnt an uncommon thing. But later i was talking to my friend and she knew someone that had strep in her placenta and when she gave birth she and the baby almost died because she lost so much blood. Im guessing this is because they didnt know she had it and therefore was never treated for it right? That really scares me but the medicine will prevent that?Or no.