With motion sensing security lights, there are a few items that can have effects on them.
It will be one of them and it takes some work to find which one.
1. Keep in mind, the so called "test " modes only check the motion capabilities of the sensor in the daylight
It does not use the daylight sensing part, so it changes when it is dark many times form what the setting is.
I never complete testing unless it is dark. The test mode allows close proximity.
2. Another light in the area can put enough light on the sensor and cause it to malfunction
3. Bulbs in the fixture itself can cause the same issue, the sensor picks up enough light to trigger
4. Anything in the zone of the sensor, can trigger, whether it be a leaf, tree limb, flag or other item that disrupts the path.
5. A bad sensor of course can cause the same issues
6 Having bulbs over the rated wattage of the fixture and sensor will cause issues until it finally burns out the sensor
7. Loose connections in the wiring or in the fixtures bulb sockets.
8. Loose Bulb socket rivets or solder will cause issues (each socket has either rivets or solder connections)
9. Low voltage on the line when the fixture is operating
Always best to start with positioning the sensor differently, little by little.
Then the bulbs positions on all fixtures in the area
Those are the items to inspect and check.
Sometimes it takes a while to find that needle in the hay stack.