This does not answer your question, but.
If you switch to the gdm login screen, the power button there works.
To switch to the gdm login screen, press Ctrl+Alt+F1, or click "Log in as another user". If you use a multi-seat system, the former will only work on the first seat. And I'm not sure if the latter is available if you only have one user (as shown in the gdm login screen).
I checked this on Fedora 28 (I think it works the same way in Debian 9 as well).
You might find it more convenient to do this all without using the mouse/touchpad etc. To shut down in gdm (or GNOME), you can press Ctrl+Alt+Del and then Enter.
Alternatively you can press Ctrl+Alt+F6 to switch to a text console, and then press the power button. In this case, you will not get any warning about the list of user login sessions, or other registered shutdown inhibitors. (If for some strange reason you wanted to reboot instead, you could use Ctrl+Alt+Del instead of the power button).