You can update the Mapped Drive settings and fix mapped drive disconnect issues by using the Group Policy Editor, Registry Editor, or via the command line.

We first need to set the default time-out period related to the autodisconnect feature.
Data type : REG_DWORD
Accepted Range : 1 to 65535 (sec)
Default value: 600 sec = 10 mins
*SPECIAL NOTE: If you set the autodisconnect value to 0 (zero), mapped drives disconnects after a few seconds of idle time. This does not deactivate this feature.
References:
Via Goup Policy(gpedit.msc)
- Run group policy editor and select:
User Configuration --> Preferences --> Windows Settings --> Drive Maps - Change Action on the selected drive to “Update” and Apply.

Via Registry
In this method, we need to change a few variables to fix the disconnecting drives.We first need to set the default time-out period related to the autodisconnect feature.
- Run regedit.exe
- Locate and then select this registry key:
- In the right pane, click the autodisconnect value. Select the Edit menu, and click Modify.
*If the autodisconnect value does not exist, create it by:- Selecting the Edit menu àNew, and then click REG_DWORD.
- Type autodisconnect, and press ENTER.
- On the Edit menu, click Modify.
- Click Hexadecimal.
- Type FFFFFFFF In the Value data box and click OK.
-
- Locate and select this registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters
- Locate and select this registry key:
Data type : REG_DWORD
Accepted Range : 1 to 65535 (sec)
Default value: 600 sec = 10 mins
-
- Change the value to your desired time.
Via Command Line
Before we begin, note that if you use this method, the auto-tuning feature for the Server service no longer needs to be active. You can either set an arbitrary value for Autodisconnect or deactivate this feature.- Changing the default time-out period(Autodisconnect feature in Server service)
- Run “cmd.exe” and on the command line type:
net config server /autodisconnect:[number]
*NOTE: [number] is the number of minutes before a mapped drive disconnects. Maximum value is up to: 65,535.
*SPECIAL NOTE: If you set the autodisconnect value to 0 (zero), mapped drives disconnects after a few seconds of idle time. This does not deactivate this feature.
- Switch off the autodisconnect feature by running this on the command line:
net config server /autodisconnect:-1
References:
- https://www.mcbsys.com/blog/2016/08/windows-10-repeatedly-disconnects-network-drives/
- https://eddiejackson.net/wp/?p=16319