I was struggling with the same issue. I tried everything. Turning off password protected printing, modifying registry keys etc. Everything the Internet had to offer.
- On the Windows 11 computer where the printer is shared, create a local user (lusrmgr.msc) I created a user named "printer" and gave it a password.
- On the Windows 10/11 computer you are trying to print from, open Control Panel > User Accounts > Windows Credentials. Select Windows Credentials, then select Add Windows Credential.
- Fill out the fields (server name, user name, password) and click OK.
Now you should be able to add a printer without being prompted for credentials.