Wayland has a pretty deep issue that loss of the compositor socket is treated as fatal and kills the client application. And when the IPC socket buffer is full that's leads to a close (so it is one of those fatal errors). So any latency spike in the event loop of the client process can lead to a process kill. The GTK implementation even calls _exit() which means atexit handlers won't trigger and save-on-exit or crash reporters won't run. So with wayland lag gets "upgraded" to hard process kills. That's a pretty crazy design choice.
X11 handles momentarily unresponsive processes far more gracefully.
https://gitlab.freedesktop.org/wayland/wayland/-/issues/159 https://bugzilla.mozilla.org/show_bug.cgi?id=1743144