I have also encountered this multiple times, and I got around it the same like @deedend have described, when unable to properly close a dialog window (e.g a dialog window inside a main window of settings), I tap the bottom arrow which bring the display up to the "open windows" view, and from there I simply close the desired dialog window.
* This happens to me primarily with UI elements that are not correctly displayed (e.g. not scaling to the screen size, so probably the button for closing the dialog window is there, but off-screen so I am unable to see it or tap on it)
* This happens to me primarily with UI elements that are not correctly displayed (e.g. not scaling to the screen size, so probably the button for closing the dialog window is there, but off-screen so I am unable to see it or tap on it)