The following commands do not disable location services on API 30. Although they do work on other API levels.
adb shell settings put secure location_providers_allowed -gps
adb shell settings put secure location_providers_allowed -network
They do not throw any error message, but they do not turn off the location services either.