Make window fullscreen then show the dialog how to unset fullscreen mode
There could be a race condition between making the window fullscreen and mapping the dialog.
If the dialog is shown first and then the window is made fullscreen, the dialog can stay behind the fullscreen window.
An alternative solution might be to make the dialog a proper transient child of the fullscreen window, but it's going to require non-trivial changes.