When I open Spotlight and type something in, I can search that query using command-B shortcut (i.e. when I type something into Spotlight and press command-B, my search query is sent to the default search engine of the Safari). There is a small quirk however. If Safari app is opened, Spotlight window stays on and I have to close it down manually (two escape keys). However, if Safari app is completely closed, Spotlight window closes automatically.
Here's two screenshots to show visually what I mean:
Spotlight -> type "example" in -> press command-B (prior to doing this, Safari was completely closed i.e. it was quit).
Spotlight -> type "example" in -> press command-B (prior to doing this, Safari was opened)
My question is the following - is this the standard behaviour or I have bug/misconfiguration on my Mac? My OS is 10.12.6.

