I have exactly the same problem as this user.
With android 12 phone only (my android 11 does not have this problem), SD card dcim/camera folder shows as empty even though there are thousands of photos in it.
i cannot use a photo app on win 10 to import photos, they don't find any files on external sd card, only internal storage (this is with the 'file transfer enabled' button active).
I cannot use file explorer in win 10 to drag and drop photos as it shows the folder is empty.
i've installed phone link, but i can't see a way of doing a bulk transfer of photos using that, so how the heck to i transfer and backup photos from my phone.
Just to reiterate this problem is limited to android 12, both my wife and i have motorola moto's, her's is 12 mine is 11, mine works hers doesn't.