WinSCP in the latest version does regain focus after from finished custom file command like Print or file comparison. The focus goes to the last application that was focused before WinSCP.
Sometimes but not very often, opposite situation occurs: WinSCP regains focus immediately after launch of the file command while showing progress bar of command execution and command window must be focused manually. In this case WinSCP correctly gets the focus after the command has finished.
These problems are not caused by Windows update because they did not occur before the update of WinSCP.