This is typically caused by a mounting issue with the sensor. Please check the following:
Verify that one piece of the sensors is mounted on the door or window and the other piece is mounted on the frame.
Both pieces must be mounted on the handle side of the door/window and not the hinge side.
Ensure that both pieces are separated greater than 3/4" when the door or window is opened