Spotting for 6 days 6 weeks pregnant

Me

I started spotting after finding out I'm pregnant.. we had intercourse with my husband and when I went bathroom I saw lots of blood it was all over us.. Literally it looked like my period started I got scared we went gynecologist to see if everything is fine and she wrote me medication called utrogestan 200mg 2 times in day.. I still have bleeding it haven't stopped 😔 only what changed that it looks like brown discharge very chunky and weird

This medication makes me feel like I'm going to pass out and i am experiencing hair loss.. I wonder if this bleeding actually is happening because of miscarriage? Doctor watched with ultrasound Wednesday and it looked like the baby was still there...

Has someone experienced the same?

Sorry for my English I'm not native speaker