The issue is that the Required Expression is stopping your trigger from running.
When the required expression becomes true, then it will start waiting for the trigger event. Since the required expression is the same in this case as the trigger event, it will not detect that the condition is valid.
Removing the Required expression would likely work - have you tried that?
Edit: I would definitely go with what @aaiyar recommends!
Lever is the YRL226 TS , deadbolt is YRD226 TSDB. Both Zigbee
Deadbolt is a great lock, the lever is a miserable POS with a rediculious tension clip that holds it together and it's currently broken. I either have too find parts or get a new lever lock, which isn't easy to find
Those are the same locks I have. Neither of them offer the feature to autolock when the door is closed. And FWIW, that's the feature the OP was looking for.
Technically, yes it's built-in. But I bought the Ultraloq U-Bolt pro and it comes with its own door sensor. It's useless unless you buy their $50 module to make the z-wave device ALSO wifi compatible. I'm cheap and not willing to add complexity when I can create a rule to do the same thing that $50 plus another sensor on a door that already has a sensor on it.
FWIW, I am a BIG fan of this thing. Soooooooo much better than the kwiksets and August locks I've had in the past.