I can reproduce this only if a pinned tab is selected before closing the last window or quitting the browser (with session restore automatically enabled) due to [this](https://searchfox.org/mozilla-central/rev/cc01f11adfacca9cd44a75fd140d2fdd8f9a48d4/browser/components/tabbrowser/content/tabbrowser.js#3271-3279) condition. Because of the work in bug 1899336, we don't want [`pinTab`](https://searchfox.org/mozilla-central/source/browser/components/tabbrowser/content/tabbrowser.js#854-858) to be called for vertical tabs because this was set up to handle actually pinning tabs based on user action. For restoring a session we want the positioning of pinned tabs to be handled consistently by [`positionPinnedTabs`](https://searchfox.org/mozilla-central/rev/cc01f11adfacca9cd44a75fd140d2fdd8f9a48d4/browser/components/tabbrowser/content/tabs.js#1601-1602) regardless of a pinned tabs' "selected" state.
Bug 1916188 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I can reproduce this only if a pinned tab is selected and I restart the browser (with session restore automatically enabled) due to [this](https://searchfox.org/mozilla-central/rev/cc01f11adfacca9cd44a75fd140d2fdd8f9a48d4/browser/components/tabbrowser/content/tabbrowser.js#3271-3279) condition. Because of the work in bug 1899336, we don't want [`pinTab`](https://searchfox.org/mozilla-central/source/browser/components/tabbrowser/content/tabbrowser.js#854-858) to be called for vertical tabs because this was set up to handle actually pinning tabs based on user action. For restoring a session we want the positioning of pinned tabs to be handled consistently by [`positionPinnedTabs`](https://searchfox.org/mozilla-central/rev/cc01f11adfacca9cd44a75fd140d2fdd8f9a48d4/browser/components/tabbrowser/content/tabs.js#1601-1602) regardless of a pinned tabs' "selected" state.