Issue with exit-script 3.8.2 Close-InstallationProgress

I have to force a reboot of the machine during an uninstall. I call exit-script immediately after the shutdown (which is set to reboot after 60 seconds).
On Windows 10 the script hangs on

<![LOG[[Post-Installation] :: Close the installation progress dialog.]LOG]!><time=“10:18:00.35260” date=“08-11-2020” component=“Close-InstallationProgress” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“8952” file=“Zscaler_ZApp_2.1.2.81_P5.ps1”>

If I put some write-log debugging in the Close-Installation progress the script is hanging on $script:ProgressRunspace.Close()

If (script:ProgressSyncHash.Window.Dispatcher.Thread.ThreadState -eq 'Running') { ## Close the progress thread Write-Log -Message 'Close the installation progress dialog.' -Source {CmdletName}
script:ProgressSyncHash.Window.Dispatcher.InvokeShutdown() Write-Log -Message 'Close the installation progress dialog. Invoke shutdown' -Source {CmdletName}
script:ProgressSyncHash.Clear() Write-Log -Message 'Close the installation progress dialog. Clear' -Source {CmdletName}
**script:ProgressRunspace.Close()** Write-Log -Message 'Close the installation progress dialog. End of process' -Source {CmdletName}
}

This works fine on Windows 7. Any thoughts on how to overcome this?

Comment out Close-InstallationProgress for Exit-Script inside Main.ps1 for this installation. Since its going to reboot, this wont really cause harm.

Sadly, runspaces designed by microsoft have a function called Close() that doesnt force close windows alongside the runspace, it gracefully waits until they are closed. So this function is waiting even when the window wont close, causing an endless loop if the window doesnt want to close.