Hello
Thank you for your question and reaching out. I can understand you are having query\issues related to Shared folder access.
You can enable the following policy:
1 Open “gpedit.msc”.
2 Go to: Local Computer Policy > Computer Configuration> Windows Settings > Security Settings > Local Policies > Security Options.
3 Find the policy: Network access: Do not allow storage of passwords and credentials for network authentication.
4 Choose the Local Security Settings to “Enable”
Reference :
--If the reply is helpful, please Upvote and Accept as answer--