Please post your automation configuration, properly formatted. It really helps us understand how you are trying to do what you are trying to do… and find the source of an issue.
I think you may be misinterpreting how triggers and conditions work with duration. The “duration”/for configuration option used in triggers and conditions set the minimum amount of time the entity must have been in that state, without changing.
It’s not “… not detected in the last X minutes”
- For trigger events it’s: “… changed to not detected (and stayed that way) for X minutes”
- For conditions it’s: “… not detected for, at least, the last X minutes”