Sorry if this has been asked before or has an obvious solution, I couldn't find either a reason or solution online when searching for this.
⌘ Command W closes tabs on Safari. The problem is, I don't know which tab it switches focus to after closing a tab. Sometimes it focuses tabs left, sometimes right. Usually when it is doing this, it consistently switches focus either left or right, but then at times it will seemingly change near the end. I really have no idea why this is happening, and it is extremely annoying when trying to close multiple tabs and keep others open, as I can't predict whether it's going to close the tab I want or not when using the shortcut many times quickly.
Please if you know the reason / pattern / way I can fix it or alternative solution to closing tabs (even third party is fine, as long as it works consistently), I would appreciate it greatly.