Lighting rule not working as expected

You might look at the Lights On Motion Plus community app. I am very happy with it. It looks like that app could do everything you are currently doing in that rule.

I think the author was too modest to not suggest this option.