### Apache Airflow version

2.2.2 (latest released)

### Operating System

MacOS 11.6.1

### Versions of Apache Airflow Providers

$ pip freeze | grep airflow
apache-airflow==2.2.2
apache-airflow-providers-celery==2.1.0
apache-airflow-providers-ftp==2.0.1
apache-airflow-providers-http==2.0.1
apache-airflow-providers-imap==2.0.1
apache-airflow-providers-sqlite==2.0.1

### Deployment

Other

### Deployment details

`airflow standalone`

### What happened

```
AttributeError: 'NoneType' object has no attribute 'update_relative'
```

### What you expected to happen

Task group should be set as downstream of `start` task, and upstream of `end` task

### How to reproduce

* Add the following code to dags folder

```python
from datetime import datetime

from airflow.decorators import dag, task, task_group


@dag(start_date=datetime(2023, 1, 1), schedule_interval="@once")
def test_dag_1():
    @task
    def start():
        pass

    @task
    def do_thing(x):
        print(x)

    @task_group
    def do_all_things():
        do_thing(1)
        do_thing(2)

    @task
    def end():
        pass

    start() >> do_all_things() >> end()


test_dag_1()
```

* Run `airflow standalone`

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

tests/utils/test_task_group.py
"""
    This is an alternative syntax to use TaskGroup. It should result in the same TaskGroup
    as using context manager.
    """
    execution_date = pendulum.parse("20200101")
    dag = DAG("test_build_task_group", start_date=execution_date)
    task1 = DummyOperator(task_id="task1", dag=dag)
    group234 = TaskGroup("group234", dag=dag)
    _ = DummyOperator(task_id="task2", dag=dag, task_group=group234)
    group34 = TaskGroup("group34", dag=dag, parent_group=group234)
    _ = DummyOperator(task_id="task3", dag=dag, task_group=group34)
    _ = DummyOperator(task_id="task4", dag=dag, task_group=group34)
    task5 = DummyOperator(task_id="task5", dag=dag)
    task1 >> group234
    group34 >> task5
    assert task_group_to_dict(dag.task_group) == EXPECTED_JSON
def extract_node_id(node, include_label=False):
    ret = {"id": node["id"]}
    if include_label:
        ret["label"] = node["value"]["label"]
    if "children" in node:
        children = []
        for child in node["children"]:
            children.append(extract_node_id(child, include_label=include_label))
        ret["children"] = children
    return ret
def test_build_task_group_with_prefix():