After upgrading my Pixel XL to Android version 10.0 Bluetooth Low Energy (BLE) scanning will only work if i have Location turned on.
This has not been an issue until
As of Android 10, it is now required to have ACCESS_FINE_LOCATION turned on in order to perform Bluetooth operations. The reason for this is that Bluetooth can be used to gather information about the location of the user (e.g. using BLE beacons), and for that the relevant app permission should be declared.
For Android 9 and lower, ACCESS_COARSE_LOCATION is sufficient which is probably why your app was working without an issue.
More information can be found here:-
I hope this helps.