### Apache Airflow version

2.4.2

### What happened

We upgraded airflow from 2.4.1 to 2.4.2 and immediately notice that every task log line is duplicated _into_ CloudWatch. Comparing logs from tasks run before upgrade and after upgrade indicates that the issue is not in how the logs are displayed in Airflow, but rather that it now produces two log lines instead of one. 

When observing both the CloudWatch log streams and the Airflow UI, we can see duplicate log lines for ~_all_~ most log entries post upgrade, whilst seeing single log lines in tasks before upgrade.

This happens _both_ for tasks ran in a remote `EcsRunTaskOperator`'s as well as in regular `PythonOperator`'s.

### What you think should happen instead

A single non-duplicate log line should be produced into CloudWatch.

### How to reproduce

From my understanding now, any setup on 2.4.2 that uses CloudWatch remote logging will produce duplicate log lines. (But I have not been able to confirm other setups)

### Operating System

Docker: `apache/airflow:2.4.2-python3.9` - Running on AWS ECS Fargate

### Versions of Apache Airflow Providers

```
apache-airflow[celery,postgres,apache.hive,jdbc,mysql,ssh,amazon,google,google_auth]==2.4.2
apache-airflow-providers-amazon==6.0.0
```

### Deployment

Other Docker-based deployment

### Deployment details

We are running a docker inside Fargate ECS on AWS.

The following environment variables + config in CloudFormation control remote logging:

```
            - Name: AIRFLOW__LOGGING__REMOTE_LOGGING
              Value: True
            - Name: AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDER
              Value: !Sub "cloudwatch://${TasksLogGroup.Arn}"
```

### Anything else

We did not change any other configuration during the upgrade, simply bumped the requirements for provider list + docker image from 2.4.1 to 2.4.2.

### Are you willing to submit PR?

- [ ] 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)

container="base",
                    follow=False,
                    tail_lines=100,
                    _preload_content=False,
                )
                for line in res:
                    log += line.decode()
            except Exception as f:
                log += f"*** Unable to fetch logs from worker pod {ti.hostname} ***\n{str(f)}\n\n"
                return log, {"end_of_log": True}
        else:
            import httpx
            url = self._get_log_retrieval_url(ti, log_relative_path)
            log += f"*** Log file does not exist: {location}\n"
            log += f"*** Fetching from: {url}\n"
            try:
                timeout = None  
                try:
                    timeout = conf.getint("webserver", "log_fetch_timeout_sec")
                except (AirflowConfigException, ValueError):
                    pass
                signer = JWTSigner(
                    secret_key=conf.get("webserver", "secret_key"),
                    expiration_time_in_seconds=conf.getint(
                        "webserver", "log_request_clock_grace", fallback=30
                    ),
                    audience="task-instance-logs",
                )
                response = httpx.get(
                    url,