muhomorr your solution described above worked for me too. Thanks bro, you're a gigachad
pabel those commands were made for linux environments. Do this in powershell (make sure you're in the folder that has the adb.exe):
.\adb.exe shell pm list packages -U
find the line package:com.google.android.gms uid:123,456,789
There can be multiple IDs for that app separated by a comma (,), so you should use the first one, or run the next command for each UID to make sure it works I guess:
.\adb.exe shell appops set 123 READ_OTP_SMS allow
.\adb.exe shell appops set 456 READ_OTP_SMS allow
.\adb.exe shell appops set 789 READ_OTP_SMS allow
Worked for me