As a follow-up:
The "servername\instance" format relies on the Browser service; it will only work correctly if your local machine can reach the remote Browser service.
The SQL Server Browser service listens on UDP port 1434; your local machine must be able to reach UDP 1434 on the remote server (and you local machine must not block incoming UDP!).
Note that a PING test will not verify if a specific port is open; to test a port, you would normally use telnet or the Powershell cmdlet Test-NetConnection. Unfortunately, neither will verify a UDP port (you can google for ways to verify a UDP port).
SQL Server Browser Service
My advice, for production MSSQL Instances: don't rely on the Browser service; set each Instance to listen on a fixed Port, and configure your connection string as "Servername,Port". You can add the Instance name for clarity "Servername\Instance,Port" but this is not strictly necessary.