I have an old nokia 6.1 - how can I use its sensors constantly also when in lock?

I have a spare Nokia 6.1, and I tried to use the companion app to collect the sensors’ data however, the sensors are only updated when the screen is unlocked.

Is there a way to avoid it? I want to put the phone on a wardrobe and read the sensors.