I'm not sure how I ended up with this situation: I seem to have two SQL Server instances with the same name, in one machine.
When I connect through SQL Management Studio I have access to the database of my application, but it is empty, tables have no rows. However when my application connects through the next connection string it has all the rows it had inserted, I mean, the application works fine.
Data Source=DESKTOP-D5BH4BP;Initial Catalog=AppDB;User ID=AppUsr;Password=pass;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
So I guess each instance points to its own files.
The question is: How can I get rid of the empty instance??
You cannot have two instances with the same name on SQL Server, it is not possible at all.
The drop down you have shared in your screenshot is only showing the server names you have connected to in past using SSMS, you can type anything there but whether that server exists or not is something different.
To get rid of these names from the drop down list, just select the name and press Delete key.