Middle-clicking a link inside a page opens the new tab in the foreground, as expected with "When opening a link in a new tab, make it active" enabled. Middle-clicking an item on the Bookmarks Bar opens the tab in the background instead, with the same setting enabled. OpenNewTabsInForeground = 1 is set in defaults. Cmd+Shift+click on a bookmark does focus the new tab, so the foreground path exists — it just isn't used by the middle-click handler for bookmarks. Version 1.1.2 (151), WebKit 625.1.8 macOS 27 Golden Gate.
Safari on the same macOS version opens the bookmark in an active tab on middle-click with the equivalent setting enabled, so this is not WebKit behaviour.
1.1.2 (151)
Tahoe (26)