When you show a dialog, the panel that is responsive becomes slightly resized, I would guess double the size, but only in the background. See second image attachment.
Which version of XD is this on? I’ve seen this in the past, but hadn’t in my own plugins lately. Can you share where you’re attaching the <dialog> node in the DOM tree?
In my experience, I think behind the scenes this is true.
IIUC your plugin dialogs and panel are part of the same HTML document.
Dialogs might be defined as dialog elements and panels may be added to the document.body element or child node of the body element (Plugins panel node related).
So if your panel doesn’t have a width and the modal dialog is displayed then the body size increases and the panel, being a block element of body fills that space.
When you give it a width, say 100%, then some behind the scenes calculations are being performed to get the panel width from the Plugins panel node rather than the body element.