A Gnome Shell Extension that focuses (and moves the cursor to) the primary monitor after the workspace was switched with a keyboard shortcut.
https://extensions.gnome.org/extension/4688/focus-follows-workspace/
This extension is meant to be used with a multi-monitor setup with the setting "Workspaces on primary display only". It enables quick switching to an application on a given workspace via keyboard by preventing the focus from being restored to a window on a secondary monitor.
It is compatible with the extension Switch Workspace.
Go to "Settings" > "Keyboard" > "View and Customize Shortcuts" > "Navigation" and assign keybindings for "Switch to workspace x".
The following command will build the extension and install it locally.
./bundle.sh -i
GPLv3 or later.