I can confirm that dialogs are not compatible with the wait statement. When a modal dialog is open, all other Panorama activity is frozen until the dialog closes. So I think what is happening is that the wait is happening, but at the end of the wait Panorama is not able to resume the code after the wait, because that activity is frozen.
If you want a dialog to automatically close after one second, you’ll need to use a regular loop, just keep checking until 1 second (or whatever time you choose) has gone past.
Or instead of using opendialog, you could use the rundialog statement, which has an automatic timeout feature. In fact, honestly, I would suggest that you NEVER use the opendialog statement, I never do. I always use the rundialog statement which has lots of nice features to help with smooth dialog operation.