On FSlateApplication
I found the following function promising
/**
* Adds a modal window to the application.
* In most cases, this function does not return until the modal window is closed (the only exception is a modal window for slow tasks)
*
* @param InSlateWindow A SlateWindow to which to add a native window.
* @param InParentWindow The parent of the modal window. All modal windows must have a parent.
* @param bSlowTaskWindow true if the window is for a slow task and this function should return before the window is closed
*/
SLATE_API void AddModalWindow( TSharedRef<SWindow> InSlateWindow, const TSharedPtr<const SWidget> InParentWidget, bool bSlowTaskWindow = false );
which according to its source does exactly what I meant to do (it has an internal while loop as well), I haven’t tested yet.