bpo-41729: Fix test_winconsole failures (3) and hang (GH-22146)

The problems occured with a repository build on machine
with freshly updated Windows 10 Pro.
1 file changed