This is working as designed for routines. If you add an auto-off to the On action then its a pure timer. Doesn’t take into account the conditions on the IF side. In routines what you’d probably want is another routine with IF no motion for X minutes THEN turn off light.