I set up an example repcase at https://apex.oracle.com/pls/apex/f?p=124888 .

At the left you can see a navigation menu featuring a "Modal Dialog" link. It passes a wrong context of apex.jQuery('#t_Body') to the apex.navigation.dialog method.
In the navigation bar on top you can see another link to "Modal Dialog", with another wrong context of apex.gPageContext$ passed to apex.navigation.dialog.
Those contexts are wrong, because they are used when closing the dialog to trigger the "apexafterclosedialog" event. Now when a Dynamic Action listens for the Dialog Close event on "body", it is never triggered.