Motion detection can be configured to be smart enough to avoid those lighting changes. For example you can use multiple zones and require an object to pass between the zones in order to trigger it.
There is also a thing in there for not triggering when some % of the scene changes all at once, though I don't trust that one as much because if someone starts tampering with a camera they will be causing huge scene changes and you want it recorded.