Limit Turning off contact sensor for 2 room lightings

I'm having an issue with a Room Lighting which won't turn off after a contact sensor becomes open. My master bathroom has a contact sensor which I use to limit for two room lighting apps, Master Bathroom and Master Bedroom Closet. They both prevent the lights from turning off, but when I open the door, the Master Bedroom Closet light won't turn off, only the Master Bathroom. It just gets stuck and the logs look like this.

Note, the app stays on until I retrigger the motion and it then finally turns off. From 6:28 to 7:06, the light just stays on even though the door was open.

This is my Master Bedroom Closet Room Lighting

My Master Bathroom has a similar setup as well as the same limit. Any help would be great. Thanks

Not sure what is happening that you don’t expect, but there is only one means to turn off : motion sensor goes from active to inactive (for at least 1 min). So it that happens while your limit condition is true and not after, then it won’t turn off.

This is the issue.

Add Master Bathroom Door Contact Sensor Open event as a means to turn off. Add 'Stays Off Pending' to the Limit Turning Off Conditions.

The Means to Turn Off are all OR events. Adding the Stays Pending keeps the lights on until the motion sensor timeout ends even if the contact sensor is opened.

I understand now, if there is no motion, and it tries to turn off, but the limit it there, it just stays on forever. I thought it would keep trying to turn off until the contact was open, then turn off. Makes sense, thank you both.