This seems to be a known issue with Windows 11. If you log in to the client system (the pc from which you are trying to access the shared folder) with a local account instead of a Microsoft account, you should be able to access those files. Another person mentioned the issue here:
https://answers.microsoft.com/en-us/windows/forum/all/windows-11-asks-for-password-to-access-network/2baf23b1-892a-4b1c-b59f-c39d886e4273
I recommend logging that you have the issue mentioned in this feedback: