I tried to reproduce the same in my environment like below:
I created a key vault with Azure role-based access control (RBAC) like below:

Make sure to add Key Vault Administrator role in Access control like below:

Generate a key vault secret under setting. While generating secret of type as Manual name and set the value to the current SQL Database connection string stored in the Application web.config

Try to use Secret value connection string of your sql database like below:

Then you can able to see Secret Identifier like below:

In your web app -> under setting click configuration -> click new connection string

Type the name of the connection string and set the value @Microsoft.KeyVault(SecretUri=VALUE), where the VALUE

In Identity under setting -> make sure to add system assigned status as on like below:

Click on the "Role Assignments" button and then Add keyvault secrets user role like below:

As you are facing database error with no details you can check the Log4net errors under Portals_default\Logs.
Reference:
Connection strings and app settings not working properly on Azure App Service · Issue #4227 · dnnsoftware/Dnn.Platform · GitHub