You need to generate a Bicep supporter that generates a connections dynamically across environments.
Here's a demonstration about using it. Integrating API Connections into Standard Logic Apps with Bicep Scripts