This bug still hasn't been fixed after android 10 was introduced and you can't do anything by playing with the settings. I read somewhere that this bug is occuring probably due to the "scooped storage" function which was first introduced in android 10.
I don't think this is a bug but it looks like the same as apple devices to secure storage but this time for Android 10 and above they called it scoped storage aka fused.
The only guide that I haven't tried yet is the guide from the XDA forum because it requires OEM enabled and must be rooted but it looks like it would work.
I found the guide here below if someone wants to try it
-
https://forum.xda-developers.com/t/closed-module-scoped-storage-disabler-11.4348419/