How to prevent VSCode from switching GNOME workspaces on build errors?

I’m working with multiple GNOME workspaces and experiencing an issue with VSCode:

Current setup:

  • Fedora with GNOME 46.7 (X11)
  • Two workspaces, on with a VSCode window, one with firefox
  • Running Docker builds in one workspace while actively working in another

Problem: When for example a Docker build fails in Workspace B, VSCode automatically switches focus from its current Workspace B back to Workspace A where i am active. This disrupts my workflow, as I use workspaces to categorically separate different projects.

What I’ve tried:

  • Looking for VSCode settings related to alerts/focus
  • Searching for GNOME workspace focus settings
  • Looking through existing threads (found no solution)

Question: How can I prevent VSCode from forcing a workspace switch when errors occur? I want each VSCode window to stay in its assigned workspace regardless of build failures or other alerts.

I’m not sure if this problem can be fixed on the Xorg session.

One thing you can try is setting focus-new-windows to strict with gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'. However this does cause new problems; clicking a link in an app may not focus the Firefox window and under certain circumstances won’t focus a new app you deliberately open. I also think Xwayland apps still steal focus.

You can revert back to default behavior with gsettings reset org.gnome.desktop.wm.preferences focus-new-windows.

Are there more options available under wayland?