If you get completely flat graphs with automatic tracking with sonar sensor after upgrading to Android 11, make sure the app has permission Draw over other apps, Display over other apps or Appear on top (Samsung). This permission is necessary for accessing the microphone from the background.
This is a companion discussion topic for the original entry at https://sleep.urbandroid.org/docs/faqs/sonar_android11.html