display settings confirmation dialog cannot be confirmed

How to reproduce:

I change my display settings by disabling my laptop's screen, so that only my external screen is active.

Actual behavior:

In ~30% of the tries I cannot confirm the change as the screen looks like this:

xfce4-display

So I can see the dialog's borders and title but the content is garbage and it does not react to clicks in the place where the buttons are supposed to be.

Therefore I can not confirm the change and after the 10 seconds timeout the confirmation dialog closes. Then I can try again.

In .xsession-errors I get just these entries when it happens:

(xfce4-display-settings:1504841): Gtk-WARNING **: 08:21:51.708: Content added to the action area of a dialog using header bars
(xfce4-display-settings:1504841): Gtk-WARNING **: 08:21:51.708: Content added to the action area of a dialog using header bars
(xfce4-display-settings:1504841): GLib-CRITICAL **: 08:22:04.563: Source ID 190 was not found when attempting to remove it
(xfce4-display-settings:1504960): Gtk-WARNING **: 08:22:08.213: Content added to the action area of a dialog using header bars
(xfce4-display-settings:1504960): Gtk-WARNING **: 08:22:08.214: Content added to the action area of a dialog using header bars
(xfce4-display-settings:1504960): GLib-CRITICAL **: 08:22:20.563: Source ID 229 was not found when attempting to remove it