Welcome. My name is ***** ***** would be glad to assist.
Based on your wiring, it appears you have it wired correctly, as the fixtures are prewired to the motion sensor and the lamp, so only need to have the power connected.
What is the spacing of the lights? Is is at all possible for the first light to shine too much on the second?
This would make the second light think it is daylight?
I would try this:
Swap the locations of the two lights installed on the same switch and see if the situation goes with the light or changes.
That will help narrow down the situation a bit.
Many of the built in motion sensors are finicky with the sensitivity setting, so set it at 80-90% before testing at night.
That makes it very sensitive to motion with the higher setting.
If these are the tiny sensors they install in some fixtures, half of them fail extremely quick after a very short timeframe and many out of the box
DO NOT use test mode at night as it bypasses the night sensor and will not show if it is all working properly within the electronics.
Let me know how it goes, we will continue as needed.