Welcome to Micrsoft Q&A forum.
As I understand, you are experiencing random behavior in Azure SQL Managed Instance connection.
From the verbatim, it seems like this is due to dependency errors.
Please refer to the Microsoft techcommunity blogpost detailing on how to change collation in such case:
Server-level collation in Azure SQL Managed Instance can be specified when the instance is created and cannot be changed later. You can set server-level collation via Azure portal or PowerShell and Resource Manager template while you are creating the instance. Default server-level collation is SQL_Latin1_General_CP1_CI_AS.
Let us know if this helps in your scenario.
Thanks