user35430: For a reason unknown to me, Arduino IDE 2.0.3 opens two tabs with the same name for this sketch. I'm not able to reproduce how to get into this situation.
Changes in one tab immediately changes the other tab as well.
How can I get rid of the second tab?

Things I tried:

File / Close (Ctrl+W) closes the whole sketch, i.e. Arduino IDE exists.
The usual key combination to close tabs (Ctrl+F4) does not work either.
I deleted all %AppData%\Local\Temp\.arduinoIDE-unsaved*.gfv2 folders
I deleted all %AppData%\Local\Temp\arduino-sketch-* folders
I deleted all %AppData%\Local\Temp\arduino-language-server* folders
I deleted all %AppData%\Local\Temp\arduino-ide2-* folders
I used Streams to check the INO file for alternate data streams
I deleted the folder %UserProfile%\.arduinoIDE

Maybe interesting: when I rename the sketch to HelloWorld2.ino, it opens only one tab. If I rename it back, I have two tabs again.
When I change the preferences to show the files in Sketchbook view, I only see one file:

The other sketches have been created when trying to reproduce the problem. They are not affected
The tooltip which shows the full file name is identical on both files:

The Registry does not contain suspicious information. I found only one occurrence of HelloWorld in
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths


user88218: 
How can I get rid of the second tab?


Press F1,
Type: View: Reset Workbench Layout into the Command Palette,
Press Enter,
IDE reloads.

If it does not help, get the layout data from the logs.

Open the DevTools with Ctrl/⌘+Alt+I built-in command,
Open the Console if it's not opened with Esc,
Right-click in the console and Save as...,
Share the data with the devs.

For example:
{"version":5,"mainPanel":{"main":{"type":"tab-area","widgets":[{"constructionOptions":{"factoryId":"code-editor-opener","options":{"counter":0,"kind":"navigatable","uri": ...


35430: <p>For a reason unknown to me, Arduino IDE 2.0.3 opens two tabs with the same name for this sketch. I'm not able to reproduce how to get into this situation.</p>
<p>Changes in one tab immediately changes the other tab as well.</p>
<p>How can I get rid of the second tab?</p>
<p><a href="https://i.stack.imgur.com/FqcL3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FqcL3.png" alt="Duplicate tab" /></a></p>
<p>Things I tried:</p>
<ul>
<li>File / Close (Ctrl+W) closes the whole sketch, i.e. Arduino IDE exists.</li>
<li>The usual key combination to close tabs (Ctrl+F4) does not work either.</li>
<li>I deleted all <code>%AppData%\Local\Temp\.arduinoIDE-unsaved*.gfv2</code> folders</li>
<li>I deleted all <code>%AppData%\Local\Temp\arduino-sketch-*</code> folders</li>
<li>I deleted all <code>%AppData%\Local\Temp\arduino-language-server*</code> folders</li>
<li>I deleted all <code>%AppData%\Local\Temp\arduino-ide2-*</code> folders</li>
<li>I used <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/streams" rel="nofollow noreferrer">Streams</a> to check the INO file for alternate data streams</li>
<li>I deleted the folder <code>%UserProfile%\.arduinoIDE</code></li>
</ul>
<p>Maybe interesting: when I rename the sketch to HelloWorld2.ino, it opens only one tab. If I rename it back, I have two tabs again.</p>
<p>When I change the preferences to show the files in Sketchbook view, I only see one file:
<a href="https://i.stack.imgur.com/WCJB9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WCJB9.png" alt="Sketchbook view" /></a></p>
<p><sub>The other sketches have been created when trying to reproduce the problem. They are not affected</sub></p>
<p>The tooltip which shows the full file name is identical on both files:</p>
<p><a href="https://i.stack.imgur.com/f9q3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f9q3c.png" alt="Identical tooltips" /></a></p>
<p>The Registry does not contain suspicious information. I found only one occurrence of HelloWorld in</p>
<pre><code>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths
</code></pre>
 88218: <blockquote>
<p>How can I get rid of the second tab?</p>
</blockquote>
<ul>
<li>Press <kbd>F1</kbd>,</li>
<li>Type: <code>View: Reset Workbench Layout</code> into the <em>Command Palette</em>,</li>
<li>Press <kbd>Enter</kbd>,</li>
<li>IDE reloads.</li>
</ul>
<p>If it does not help, get the <a href="https://github.com/arduino/arduino-ide/blob/76f9f635d8558f399423f64c0c709e3a53bdcd03/arduino-ide-extension/src/browser/theia/core/shell-layout-restorer.ts#L23-L25" rel="nofollow noreferrer">layout data</a> from the logs.</p>
<ul>
<li>Open the DevTools with <kbd>Ctrl/⌘</kbd>+<kbd>Alt</kbd>+<kbd>I</kbd> <a href="https://github.com/eclipse-theia/theia/blob/7c559c87b3ffb0c7c3845309c20d3bf22529a076/packages/core/src/electron-browser/menu/electron-menu-contribution.ts#L340-L343" rel="nofollow noreferrer">built-in</a> command,</li>
<li>Open the <em>Console</em> if it's not opened with <kbd>Esc</kbd>,</li>
<li>Right-click in the console and <code>Save as...</code>,</li>
<li>Share the data with the devs.</li>
</ul>
<p>For example:</p>
<pre class="lang-json prettyprint-override"><code>{&quot;version&quot;:5,&quot;mainPanel&quot;:{&quot;main&quot;:{&quot;type&quot;:&quot;tab-area&quot;,&quot;widgets&quot;:[{&quot;constructionOptions&quot;:{&quot;factoryId&quot;:&quot;code-editor-opener&quot;,&quot;options&quot;:{&quot;counter&quot;:0,&quot;kind&quot;:&quot;navigatable&quot;,&quot;uri&quot;: ...
</code></pre>
