Why is my period changing every month

Patient: Before I sex with my boyfriend my period came for 5 days which is regular for me, the second time after we had sex my period came for 7 days nd the last time after we had sex my period came for 4 days nd by the way we have unprotect sex nd he always cum inside me! Is this happening because of the unprotcted sex, I just dont know

Doctor: