Windows 10 Pro 22H2

Why does Windows 'lose' access to network shared folders? I notice this usually happens after waking from sleep or hibernation but sometimes it just happens randomly - I'm in a shared folder, go to non-shared folder, return to shared folder = shared folder no longer accessible (although I'm still able to access the PC that has the shared folders via Remote Desktop). If I'm given the option to run the troubleshooter, no problems are found, and I have to restart my PC to get the access back. Is there any way to fix this other than restarting the PC?