The Dialog class destroys the modal (and so removes it from the DOM) when the dialog closes but leaves the modal-open class on the body element if there are still other modal(s) in the DOM. The problem is that (maily on the frontend side) there may be others modal(s) in the DOM (not handled by the Dialog class) but which are not shown to the user, and in that case the modal-open class should be removed.