I confirm the same observation, that the script runs with PyQt5 (pyqt5 5.15.4) installed via pip and fails when run with PySide2 (PySide2-5.15.2) installed via pip:
QObject::moveToThread: Current thread (0x22b951c64b0) is not the object's thread (0x22b951c6c50).
Cannot move to target thread (0x22b951c64b0)
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: direct2d, minimal, offscreen, webgl, windows.
Following the advice of this thread (https://forum.qt.io/topic/93085/qt-python-development-pyside2/6), I removed the PySide2 installed via pip and installed the version via conda-forge (v 5.13.2) and was able to run the script. So, it appears a matter of packaging/dependencies rather than a strict inability for PySide2 to handle it or something related to the version.