It turns out that the issue was in the following GNOME Shell extension: https://extensions.gnome.org/extension/120/system-monitor/
homepage: https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet When I disable it, the problem is gone. This extension is probably blocking the main drawing or execution thread (if there is such a thing in GNOME Shell) which then causes the entire GUI to regularly freeze for a moment. But I am not fully sure.