My folks, I can reproduce!
I did this:
- Change the USB-C port setting to "Charging-only"
- Rebooted the phone (not sure it's necessary)
- Changed the USB-C port setting to "Charging-only when locked"
- Inserted a USB drive (one that I regularly use with the phone) when the phone was unlocked
Waited a minute, but it was not detected by the OS. Replugged several times, not detected.
- Rebooted the phone
The USB drive is now detected when the phone is unlocked.
Pixel 8
GrapheneOS 2024102100
Wishing you all a splendid day!