systemd provides an inhibitors/delays on the system bus that can prevent the pc from shutting down/going to sleep etc.
Since 2012 gnome-session purposely doesn't respect these inhibitors and only listens exclusively to inhibitors from gnome-session-inhibit on the session bus.
This is annoying to applications which use the general purpose inhibit API to set inhibitors which are not then respected.
There may be additional nastiness to untangle here as gnome sets it's own inhibitors on the system bus that then block shutdown/sleep when systemd inhibitors are no longer dropped.
$ systemd-inhibit --list
...
GNOME Shell 1000 ninya 1471 gnome-shell sleep GNOME needs to lock the screen delay
ninya 1000 ninya 1700 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses block
ninya 1000 ninya 1700 gsd-media-keys sleep GNOME handling keypresses delay
ninya 1000 ninya 1704 gsd-power sleep GNOME needs to lock the screen delay
Respect systemd inhibitors on the system bus in addition to those from the gnome-session-inhibit API.