This problem sounds related to focus stealing prevention. That's the feature intended to put new windows in the background when the system thinks you're still busy in the foreground.
However, since you're using a 4-year old release I would first recommend trying the latest long term release (22.04.1): https://ubuntu.com/download/desktop because this bug is likely to have been fixed already. ** Summary changed: - applications start in the background instead of the foreground + [bionic] applications start in the background instead of the foreground -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-shell in Ubuntu. https://bugs.launchpad.net/bugs/1993940 Title: [bionic] applications start in the background instead of the foreground To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1993940/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs