When opening a non-blocking QDialog while the parent window (QMainWindow) is in fullscreen, the dialog is opened in another workspace.
I have attached a minimal example that repro the issue with the following steps:
1) When the application is run, it will open in fullscreen (i.e in another workspace)
2) Click the "Open dialog" button. Notice a frameless dialog will open up in the same workspace as the fullscreen window
3) Close the dialog using ESC key
4) Exit fullscreen in the mainwindow by clicking the green traffic light button
5) Then enter back fullscreen by clicking on the same button
6) Now repeat step 2). Notice the dialog is opened in another workspace