We can create below registry for the session leak issue:
Under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Kernel"
create a SeTokenDoesNotTrackSessionObject value (it should be a reg REG_DWORD value) and set to 1
Path :
HKLM\SOFTWARE\Citrix\Citrix Virtual Desktop Agent
Value Type = REG_DWORD
Value Name = DisableLogonUISuppression
Data : 0 - Feature enabled (LOGON UI SUPPRESSION – No Black Screen)
1 - Feature disabled (You will see the Black screen issue).
Add registry on the VDA to extend wait time:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI
Value Name: UsermodeLoadedWaitMS
Type: REG_DWORD
Data (decimal): 30000 (Example 30000milliseconds = 30seconds)