It most likely a bug im workin on fixing. But there is the possibility he snuck in if you just closed the door, in my game he has at max 5 sec before attacking
hey so it also happened to me aroudn the 4th night freddy around 2-3 am freddy appears on the door on the right and doesn't reset so i keept the right door close but he enter anyways. i think it is a bug in the game