Actually, using master, I can reproduce this every now and then, and only if the window is in fullscreen mode.
The code that sends the pong back to the window manager is exactly identical to how everybody else (SDL, GLFW, etc.) also do it, and yet the window manager doesn't accept ours. It's also strange that this only happens with Gnome and only since recent versions. If I comment out the pong response, other window managers would also flag the application as unresponsive, so the code seems to be doing what it is meant to with other window managers.
I really have no idea what to do at this point. If anybody has contact to some Mutter developers, maybe they can also check if this might be some kind of regression. This is reproducible with the available packages and a really tiny amount of code, so it hopefully shouldn't cost them too much time.