Are you sure you don’t have any other automation turning on your lights?
If you go to your light under Settings > Devices and Services, you will find a box showing the last entries in the Logbook related to that device. There you can see what is turning on your light right after your automation turns it off.
I wouldn’t expect any motion sensor to capture a light turning off as a motion, but if your camera is doing that, maybe you have to find a work around.
I always like more real motion sensors, even having cameras in some of the areas where I monitor for motion.
There’s always a solution, but that will require a bit more thinking for a new automation which would take in account this behavior from your camera, as some test so you discover the unknown behaviors.
Let’s try this… delete all your automations used to control this light, then go to Settings > Automations & Scenes > Create new automation > Click on the 3-dots menu at the top right and select “Edit YAML”, then paste this and save:
Basically I’m repeating your original automation (just trying to put in an easier to understand format) and adding a condition to not turn on the light until it is off for at least 3 seconds.
I am not sure what the ID does, but I do know when I was first starting, I copied someone else’s automation ID and my system basically said nice try and have a nice day.