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

if (
                session.query(literal(True))
                .filter(
                    and_(
                        cls.dag_id == dag.dag_id,
                        (timezone.utcnow() - timedelta(seconds=min_update_interval)) < cls.last_updated,
                    )
                )
                .scalar()
            ):
                return False
        log.debug("Checking if DAG (%s) changed", dag.dag_id)
        new_serialized_dag = cls(dag, processor_subdir)
        serialized_dag_db = (
            session.query(cls.dag_hash, cls.processor_subdir).filter(cls.dag_id == dag.dag_id).first()
        )
        if (
            serialized_dag_db is not None
            and serialized_dag_db.dag_hash == new_serialized_dag.dag_hash
            and serialized_dag_db.processor_subdir == new_serialized_dag.processor_subdir
        ):
            log.debug("Serialized DAG (%s) is unchanged. Skipping writing to DB", dag.dag_id)
            return False
        log.debug("Writing Serialized DAG: %s to the DB", dag.dag_id)
        session.merge(new_serialized_dag)
        log.debug("DAG: %s written to the DB", dag.dag_id)
        return True
    @classmethod
    @provide_session
    def read_all_dags(cls, session: Session = None) -> dict[str, SerializedDAG]: