### Apache Airflow version

Airflow  2.5.1

### What happened

Connection password values appearing in the "Task Instance Details" -> "Task Attributes" -> environment field.

We are setting environment variables for the docker_operator with values from the password field in a connection. 

The values from the password field are masked in the "Rendered Template" section and in the logs but it's showing the values in the "environment" field under Task Instance Details.


### What you think should happen instead

These password values should be masked like they are in the "Rendered Template" and logs.

### How to reproduce


Via this DAG, can run off any image.

Create a connection called "DATABASE_CONFIG" with a password in the password field.

Run this DAg and then check its Task Instance Details.


DAG Code:

```

from airflow import DAG
from docker.types import Mount
from airflow.providers.docker.operators.docker import DockerOperator
from datetime import timedelta
from airflow.models import Variable
from airflow.hooks.base_hook import BaseHook
import pendulum
import json

# Amount of times to retry job on failure
retries = 0

environment_config = {
    "DB_WRITE_PASSWORD": BaseHook.get_connection("DATABASE_CONFIG").password,
}

# Setup default args for the job
default_args = {
    "owner": "airflow",
    "start_date": pendulum.datetime(2023, 1, 1, tz="Australia/Sydney"),
    "retries": retries,
}

# Create the DAG
dag = DAG(
    "test_dag",  # DAG ID
    default_args=default_args,
    schedule_interval="* * * * *",  
    catchup=False,
)

# # Create the DAG object
with dag as dag:
    docker_task = DockerOperator(
        task_id="task",
        image="<image>",
        execution_timeout=timedelta(minutes=2),
        environment=environment_config,
        command="<command>",
        api_version="auto",
        docker_url="tcp://docker.for.mac.localhost:2375",
    )
    
```
Rendered Template is good:
![image](https://user-images.githubusercontent.com/41356007/224928676-4c1de3d9-90dc-40dc-bb27-aa10661537ba.png)


In "Task Instance Details"
![image](https://user-images.githubusercontent.com/41356007/224928510-0dc4fc40-f675-49fd-a299-2c2f42feef5b.png)



### Operating System

centOS Linux and MAC

### Versions of Apache Airflow Providers

_No response_

### Deployment

Docker-Compose

### Deployment details

Running on a docker via the airflow docker-compose

### Anything else

_No response_

### Are you willing to submit PR?

- [x] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

]
            owner_links_dict = DagOwnerAttributes.get_all(session)
            import_errors = session.query(errors.ImportError).order_by(errors.ImportError.id)
            if (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG) not in user_permissions:
                
                import_errors = import_errors.join(
                    DagModel, DagModel.fileloc == errors.ImportError.filename
                ).filter(DagModel.dag_id.in_(filter_dag_ids))
            for import_error in import_errors:
                flash(
                    "Broken DAG: [{ie.filename}] {ie.stacktrace}".format(ie=import_error),
                    "dag_import_error",
                )
        from airflow.plugins_manager import import_errors as plugin_import_errors
        for filename, stacktrace in plugin_import_errors.items():
            flash(
                f"Broken plugin: [{filename}] {stacktrace}",
                "error",
            )
        num_of_pages = int(math.ceil(num_of_all_dags / float(dags_per_page)))
        state_color_mapping = State.state_color.copy()
        state_color_mapping["null"] = state_color_mapping.pop(None)
        page_title = conf.get(section="webserver", key="instance_name", fallback="DAGs")
        page_title_has_markup = conf.getboolean(
            section="webserver", key="instance_name_has_markup", fallback=False
        )
        dashboard_alerts = [
            fm for fm in settings.DASHBOARD_UIALERTS if fm.should_show(get_airflow_app().appbuilder.sm)
        ]
        def _iter_parsed_moved_data_table_names():