Can being on the pill for acne make it worse?

Can taking a pill for a while result in a resurgence of acne? Because I’ve been taking the pill for about 5 months and it cleared my acne up (the only reason I’m taking it for, there’s no way I could be pregnant) but now my acne is coming back hard:(