Thank you for the link.
After giving it some thought I realize it is another way to achieve the same, I hope you know what I mean?
I think something like this happens: the light-off automation is active for some (small) time-period. When during this time-period a new automation-trigger comes in, this one is ignored as the automation is working on the active task. In case of the xiaomi motion sensor this means wait for 2 minutes before a new trigger is generated. So, to get the effect that I want, either the xiaomi sensor delay time must go down to a few seconds, or the automation-function would need to have some kind of waiting-queue that can handle such kind of automation-collisions.