### 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)

upstream: bool,
        downstream: bool,
        future: bool,
        past: bool,
        state: TaskInstanceState,
    ):
        dag: DAG = get_airflow_app().dag_bag.get_dag(dag_id)
        if not run_id:
            flash(f"Cannot mark tasks as {state}, as DAG {dag_id} has never run", "error")
            return redirect(origin)
        altered = dag.set_task_group_state(
            group_id=group_id,
            run_id=run_id,
            state=state,
            upstream=upstream,
            downstream=downstream,
            future=future,
            past=past,
        )
        flash(f"Marked {state} on {len(altered)} task instances")
        return redirect(origin)
    @expose("/confirm", methods=["GET"])
    @auth.has_access(
        [
            (permissions.ACTION_CAN_EDIT, permissions.RESOURCE_DAG),
            (permissions.ACTION_CAN_EDIT, permissions.RESOURCE_TASK_INSTANCE),
        ]
    )
    @action_logging
    def confirm(self):