Moving/Editing AAD SQL connections between environments for Power Apps

Hello everyone,

I am building a Power Apps application with a SQL Server connection as a solution. The app should be basically for add / update values from the database. The app is inside a solution, where I have added the SQL Server connection and the authentication mode as AAD. In Power Platform I have 3 environments (DEV, Test, Prod) and I have two SQL Servers (DEV and Prod). I have a pipeline in my solution that automatically deploys my unmanaged solution from DEV to Test / Prod as managed solution.

However, in my Prod environment I want to switch the SQL Server name to Prod and it would be pain to change manually the connection every time (since I have around 20 tables). Is there a way to automatically change the database name when deploying the solution to Prod? Ideally using the AAD method as SQL Server authentication. As a workaround, I have tried creating global variable in Power Apps and assign the global variable for example to my gallery data source but it did not work.

Thank you.
If my question is not clear, please let me know and I try to provide more details.

Guilherme