gsettings set org.gnome.shell.app-switcher current-workspace-only true

Alternatively, you can use dconf-editor to set the property:

  1. Navigate to: org -> gnome -> shell -> app-switcher

  2. Set "current-workspace-only" to true

dconf-editor screenshot

👉 Source