A main frame goes to the bottom when a dialog is destroyed

Referencing the document:

wx.ProgressDialog — wxPython Phoenix 4.2.2 documentation
… Each call to this function moves the progress bar a bit to indicate that some progress was done.

You should call Pulse during processing, e.g.,

    def OnButton(self, event):
        with wx.ProgressDialog('ProgDlg', parent=self) as dlg:
            for x in range(100):
                dlg.Pulse(f'Working.. {x}')
                sleep(0.05)

This seems to work when you give parent option.

As an example of using ProgressDialog with thread, see also: