Accelerometer data when Android phone screen is off, in a progressive-web-app with service worker

I know that a standard website probably cannot access accelerometer data when the Android phone screen is off. It seems to be the same for a native Android app as explained in How to get sensor data in service when screen is turned off? (I don’t know if this answer is still up-to-date).

But is it possible in the context of a PWA?

Can a progressive-web-app, with a registered service worker, access to the accelerometer data when the screen is off?