The dialog manager doesn’t remember the resource ID, but that doesn’t stop you from leaving your own breadcrumbs
Some time ago, I noted that there is no way to recover the dialog resource ID that produced a dialog. I meant that in the sense that the dialog manager has no way of providing that information becaues it doesn’t remember it.