Close the empty project before adding a project to a window (#54450)

This prevents the user from getting into a state where they have unsaved
untitled buffers, but no way to get back to them.

Release Notes:

- N/A
7fc65c7db6Max Brunsfeld committed on 4/21/2026, 8:09:34 PM· committed by GitHubparentdd5cf89
2 files changedLine totals unavailable