Getting a period on the pill

Hey so on December 25th I miscarried and went straight on the pill. I’ve attempted to skip 2 periods by continuing to take the pills but I’ve come on twice anyway (monthly- not spotting in between ) . Does this mean the pill isn’t working? I got pregnant on the pill before I miscarried but my doctor said it was a one off...