When creating a new tab using "right-click: New Tab", Firefox creates (and switches to) the new tab at a position immediately to the right of the cursor position (or if the cursor is over a pinned tab, as the leftmost unpinned tab).
However, when subsequently closing the new tab, Firefox returns focus not to the tab previously displayed before the new tab was created, but instead to the tab to its right.
This behaviour is inconsistent. It is also different to the behaviour when creating a new tab using Ctrl-T.
Please either alter it so that focus returns to the previously displayed tab or provide a configurable setting so a user can choose this more consistent behaviour.