This is an issue i've been fighting for awhile as well. In industry, i've encountered PIR modules / old sensors can be susceptible to high freq interference. E.g. I have WiFi on my PI.
-
Ensure the PIR is a 6in+ physical distance from your dev board / any radios. This helps.
-
Ensure no high freq noise can couple on any of the 3 wires connected to the PIR
I did #2 via a PI filter. Inductors + a cap. Ideally i'd have caps at both ends of high and low values for both frequency contents. The signal line itself can couple noise so ideally a ferrite bead + resistor to snub any type of noise. I've had to employ similar strategies with other sensors to deal w/ interference issues.