This was an issue with the microsoft odbc driver, which has been fixed with Microsoft ODBC Driver 17.4
With the new release, sqlcmd and sqlsrv driver for php are able to query UDP port 1434 to ask the MSSQL Server for the port number of the named instance