### Apache Airflow version

Other Airflow 2 version (please specify below)

### What happened

ON Airflow 2.4.2 Dag dependencies graph show deleted DAGs that use to have dependencies to currently existing DAGs

### What you think should happen instead

Deleted DAGs should not appear on DAG Dependencies

### How to reproduce

Create a DAG with dependencies on other DAG, like a wait sensor.
Remove new DAG

### Operating System

apache/airflow:2.4.2-python3.10

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

dags = [
            DAG("dag_1"),
            DAG("dag_2"),
            DAG("dag_3"),
        ]
        with assert_queries_count(10):
            SDM.bulk_sync_to_db(dags)
    @pytest.mark.parametrize("dag_dependencies_fields", [{"dag_dependencies": None}, {}])
    def test_get_dag_dependencies_default_to_empty(self, dag_dependencies_fields):
        """Test a pre-2.1.0 serialized DAG can deserialize DAG dependencies."""
        example_dags = make_example_dags(example_dags_module)
        with create_session() as session:
            sdms = [SDM(dag) for dag in example_dags.values()]
            
            for sdm in sdms:
                del sdm.data["dag"]["dag_dependencies"]
                sdm.data["dag"].update(dag_dependencies_fields)
            session.bulk_save_objects(sdms)
        expected_dependencies = {dag_id: [] for dag_id in example_dags}
        assert SDM.get_dag_dependencies() == expected_dependencies