You can move
it with negative coordinates until it becomes on screen:
dialog.move(-dialog.width(), -dialog.height())
This should move it so it's bottom right edge aligns with main windows's top left edge.
Or you could make the dialog parentless and move it in relation to screen coordinates instead:
dialog.setParent(None)
dialog.move(400, 300)