SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)]
There was a breaking change introduced that started validating CA of the cert on the SQL Server. This means that the .NET library will try to validate the whole chain of trust now for the cert. Previously this was not the case. Either the cert on the SQL Server needs to be updated to a valid certificate or the following needs to be added to the connection string:
TrustServerCertificate=True;