You can change this by disabling the option
focus-change-on-pointer-rest in schema
org.gnome.shell.overrides (which overrides the original option in
org.gnome.mutter while GNOME Shell is running).
But note that this might actually have more downsides than you expect.
When this option is enabled, there is a hardcoded delay of 25 milliseconds "to check whether the pointer has stopped moving after a crossing event", added in commit 59bc5b7 in response to bug report 678169.
display: (Optionally) delay focus changes in focus-follows-mouse mode
Moving focus immediately on crossing events as we currently do
in focus-follows-mouse mode may trigger a lot of unwanted focus
changes when moving over unrelated windows on the way to a target.
Those accidental focus changes
- prevent features like GNOME Shell's application menu from
- and are visually expensive since we now use a very distinct
style for unfocused windows.
Instead, delay the actual focus change until the pointer has stopped
(Commit message reformatted to emphasize the reasons.)