A lot of battery powered devices will only send out movement detection alerts every 5 minutes or so to save battery life. The assumption being that these will be used for security and not presence based lighting. You only need one alert that someone is in your house when they shouldn’t be for the alarm to sound.
The xiaomi device appears to be a little better in that it actually sends out an ‘on’ message for two minutes. So the other automation solution will work and you only need to check the movement sensor state not the last changed attribute when it triggers on you turning all the lights off.
Edit: that’s not true, see the discussion here: Xiaomi Human / Body / Motion Sensor - Timeout
Particularly this post: Xiaomi Human / Body / Motion Sensor - Timeout - #20 by Dullage