Looks like a bug in dcx. It's allowing itself to be unloaded, which means you have to re-initialize it.
I have dlls that stay persistent in memory when hitting "No" to the exit confirmation dialog, so this isn't a bug in mIRC.
As a sidenote, you should always be testing if dcx is active and loading it if it is not. This should be at the top of all of your dcx related commands. DCX can be unloaded for a number of reasons, and your script should be able to handle that and recover. You shouldn't have some hacky popup that reinitializes it manually. Instead, add something like the following to your script:
alias load_dcx {
if ($dll(dcx.dll)) return
dll dcx.dll LoadDCX | ; replace this with the line to initialize dcx
}
And use /load_dcx prior to any popup/dialog creation commands.