PIR sensor problem

Ignoring signals is not bad when they are not meaningfull and powering on and off some components can indeed lead to weird situations.

Keep it simple

For your project you might benefit from studying state machines. Here is a small introduction to the topic: Yet another Finite State Machine introduction

(What’s your PIR ? Some have potentiometers to set the triggering sensitivity and duration of alert )