Have you noticed that Xcode (15 for sure, I think 14 and earlier, too) has at least two kinds of source editor tabs. Some have the filename in regular text, some have it italicized.
When the name is italicized, selecting another file in the navigator replaces the contents of that tab with that other file. When the filename is regular, a new tab is opened if you select a different file.
When working with multiple related documents, I really dislike, in general, the browser model, wherein a windows contents are replaced by the thing you navigated to. But that's a whole separate rant.
For now, I just want to know how and when Xcode decides to make one tab type or the other, and how can I control the behavior?