For WSL users, the GUI window will receive the last keypress from previous run. i.e. after pressing q to close the GUI window such as a video output from cv2.imshow(), when the user runs a script again, cv2.waitKey(1) & 0xFF == ord("q") will be evaluated to True without the user pressing anything, causing the video output to end prematurely.
Same issue has been documented in microsoft/wslg#213