The error happens because sidePanel.open() must be triggered by a user action, like clicking a button. Since creating the incognito window happens in the background without user interaction, Chrome blocks the side panel from opening.
Instead of opening the incognito window automatically, let the user click a button first. Then, in response, open the window and side panel.
Hope this helps!