The role contributor permission at the resource group level works perfectly for connecting GitHub Actions to Azure SQL, but for Azure SQL may not be enough. When the SQL Managed Instance Contributor Azure role is applied to a resource group (RG), it's not applied to SQL Managed Instance and has no effect.
Please try to set up a SQL Managed Instance Contributor role at the subscription level.