Thanks for the heads up and the workaround – the handling of these flags is one of the few things really noticeably different between PyQt5 & PySide2 (the two versions of the books differ quite a bit in this chapter) so I’ll get a note about this in the next PySide2 update.
Even once it’s fixed, this workaround will still be fine, so don’t worry about using it in projects.