This is just one more reason to use a secure operating system such as GrapheneOS which has implemented a sensors toggle for all apps:
https://grapheneos.org/features
"Sensors permission toggle: disallow access to all other sensors not covered by existing Android permissions (Camera, Microphone, Body Sensors, Activity Recognition) including an accelerometer, gyroscope, compass, barometer, thermometer and any other sensors present on a given device. To avoid breaking compatibility with Android apps, the added permission is enabled by default."