### Apache Airflow version

2.6.3

### What happened

Select tasks from List Task Instance page in UI and select clear
Only those tasks are cleared and downsteam tasks are not also cleared as they are in the DAG graph view

### What you think should happen instead

downstream tasks should also be cleared

### How to reproduce

Select tasks from List Task Instance page in UI for which there are downstream tasks and select clear

### Operating System

rocky

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

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

"is_mapped": group_is_mapped,
            }
        group_summaries = [get_summary(dr) for dr in dag_runs]
        return {
            "id": task_group.group_id,
            "label": task_group.label,
            "children": children,
            "tooltip": task_group.tooltip,
            "instances": group_summaries,
        }
    return task_group_to_grid(dag.task_group, grouped_tis, is_parent_mapped=False)
def get_key_paths(input_dict):
    """Return a list of dot-separated dictionary paths."""
    for key, value in input_dict.items():
        if isinstance(value, dict):
            for sub_key in get_key_paths(value):
                yield f"{key}.{sub_key}"
        else:
            yield key
def get_value_from_path(key_path, content):
    """Return the value from a dictionary based on dot-separated path of keys."""
    elem = content
    for x in key_path.strip(".").split("."):
        try:
            x = int(x)
            elem = elem[x]
        except ValueError:
            elem = elem.get(x)
    return elem
def get_task_stats_from_query(qry):