### Apache Airflow version

2.6.2

### What happened

All tasks were run 1 time. The try number is 2 for all tasks

### What you think should happen instead

Try number should be 1 if only tried 1 time

### How to reproduce

Run a task and use the UI to look up try number

### Operating System

centos

### Versions of Apache Airflow Providers

_No response_

### Deployment

Virtualenv installation

### Deployment details

_No response_

### Anything else

_No response_

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

if conn_type_from_extra_field == conn_type:
                    value = form.data[key]
                    
                    
                    if value != "":
                        extra[field_name] = value
        if extra.keys():
            form.extra.data = json.dumps(extra)
    def prefill_form(self, form, pk):
        """Prefill the form."""
        try:
            extra = form.data.get("extra")
            if extra is None:
                extra_dictionary = {}
            else:
                extra_dictionary = json.loads(extra)
        except JSONDecodeError:
            extra_dictionary = {}
        if not isinstance(extra_dictionary, dict):
            logging.warning("extra field for %s is not a dictionary", form.data.get("conn_id", "<unknown>"))
            return
        for field_key, field_name in self._iter_extra_field_names():
            value = extra_dictionary.get(field_name, "")
            if not value:
                
                value = extra_dictionary.get(field_key, "")
            if value:
                field = getattr(form, field_key)
                field.data = value
class PluginView(AirflowBaseView):