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



return redirect(origin)
        recent_runs = session.execute(
            select(DagRun.conf, func.max(DagRun.run_id).label("run_id"), func.max(DagRun.execution_date))
            .where(
                DagRun.dag_id == dag_id,
                DagRun.run_type == DagRunType.MANUAL,
                DagRun.conf.isnot(None),
            )
            .group_by(DagRun.conf)
            .order_by(func.max(DagRun.execution_date).desc())
            .limit(5)
        )
        recent_confs = {
            run_id: json.dumps(run_conf)
            for run_id, run_conf in ((run.run_id, run.conf) for run in recent_runs)
            if isinstance(run_conf, dict) and any(run_conf)
        }
        if request.method == "GET" or (
            not request_conf and (ui_fields_defined or show_trigger_form_if_no_params)
        ):
            
            default_conf = ""
            doc_md = wwwutils.wrapped_markdown(getattr(dag, "doc_md", None))
            form = DateTimeForm(data={"execution_date": request_execution_date})
            if request_conf:
                default_conf = request_conf
            else:
                try:
                    default_conf = json.dumps(
                        {str(k): v.resolve(suppress_exception=True) for k, v in dag.params.items()},