**Reproduce on main:**
- Run a DAG
- Rename the DAG
- Wait for dag file processor to remove the deleted DAG and add the new one. (Old Dag should not appear on the home page anymore)
- Go to the Browse DAGRUN page.
- Click on a DagRun of the deleted DAG, as if you want to see the 'details/grid' of that old dag run

More info and screenshots here:
https://github.com/notifications#discussioncomment-6898570

![image](https://github.com/apache/airflow/assets/14861206/7af81643-6278-4d90-a20f-6aa7b259ce59)



dag_id: str,
        dag_run_id: str,
        confirmed: bool,
        session: Session = NEW_SESSION,
    ):
        if not dag_run_id:
            return {"status": "error", "message": "Invalid dag_run_id"}
        dag = get_airflow_app().dag_bag.get_dag(dag_id)
        if not dag:
            return {"status": "error", "message": f"Cannot find DAG: {dag_id}"}
        set_dag_run_state_to_queued(dag=dag, run_id=dag_run_id, commit=confirmed)
        if confirmed:
            return {"status": "success", "message": "Marked the DagRun as queued."}
        else:
            
            all_task_ids = [task.task_id for task in dag.tasks]
            existing_tis = session.execute(
                select(TaskInstance.task_id).where(
                    TaskInstance.dag_id == dag.dag_id,
                    TaskInstance.run_id == dag_run_id,
                )
            )
            completed_tis_ids = [task_id for (task_id,) in existing_tis]
            tasks_with_no_state = list(set(all_task_ids) - set(completed_tis_ids))
            details = [str(t) for t in tasks_with_no_state]
            return htmlsafe_json_dumps(details, separators=(",", ":"))
    @expose("/dagrun_failed", methods=["POST"])
    @auth.has_access_dag("PUT", DagAccessEntity.RUN)
    @action_logging
    def dagrun_failed(self):