This PR fixes the current master (3297f5c11c72dd83479ff8335e047555e3f8cb3b) when running bitcoin-qt on Ubuntu 22.04 and quitting:
$ ./src/qt/bitcoin-qt -signet -sandbox=log-and-abort
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
ERROR: The syscall "inotify_rm_watch" (syscall number 255) is not allowed by the syscall sandbox in thread "main". Please report.
terminate called without an active exception
Aborted (core dumped)
Also see #24659 (review)