• Please check whether ‘Be made using this security context’ option is selected in the ‘Security’ tab while connecting to the on-premises SQL DB through the Azure VM and the correct credentials are used to login to the SQL Server instance.

Also, as you are facing a Transact-SQL exception error, please check the ‘Catalog’ option in the SQL connection whether it has the correct SQL DB name specified there or not as it should be there as below. Once, the DB has been mapped and linked, then please check the ‘RPC’ and ‘RPC Out’ options whether they are set to ‘True’ or not as below. Once, the said has been done, also, check the on-premises inbound firewall settings whether requests to access the SQL Server over port 1433 and HTTPS 443 are allowed or not for the said Azure SQL Managed Instance.: -

Please refer the below link for more details: -
https://www.sqlshack.com/create-linked-server-azure-sql-database/