I thought I had a basic understanding of RM and have several rules setup similarly but this seems inconsistent as I noticed today that it turned off 5 mins after turning on even though there was motion. My intent is to have the light turn on with motion and turn off after 5 mins if no more motion is detected. It serves a secondary purpose of turning the light off after 5 mins if turned on manually and no motion. I want to reset the timer each time motion is detected.
Adding to the above, even if you have that logic handled by some other rule, there's an interesting flow with this rule: you're waiting for motion to become active, then turning off the light once that happens (or after 5 minutes have elapsed if that doesn't happen first). This is accomplished by the first two actions as written in your rule, but it sounds like that was not your intent.
A "Wait for expression: motion inactive" (not active) with a duration (not timeout) of 5 minutes set on that expression is one way you might be able to work around this, the other being keeping things as-is while checking if %device% equals "timeout" afterwards (see: Rule 5.1 | Hubitat Documentation).
A tip: enabling all logging for the rule and then checking the output of Logs, filtered to just this rule, is a great way to see what is happening when. While we can't say exactly what is happening with your rule without this, the above is a likely scenario.
Have you considered using an app designed to handle this kind of automation instead? Room Lighting and Mode and Motion are two strong contenders, though even Basic Rule could handle most of this. You may need to combine multiple apps (possibly including Rules) to handle some of the more unusual cases here, but even if you end up needing a Rule to do that, you'll have a simpler Rule that is easier to troubleshoot -- and a simpler time setting up the rest of the automation.
Also, thinking the Cancel Delayed actions should be the first thing after a trigger. The way it is now, you could have multiple instances with delayed actions running for at least 10 minutes (which also may be why it is not working except for "sometimes")
You're completely right. I should have explained that I have other rules in place that turn on the light(s), such as contact sensor, motion sensor, and door lock. I want one rule though that will turn it off strictly based on the motion sensor, regardless of how it's turned on.