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



start = current_page * logs_per_page
        end = start + logs_per_page
        sort_column = Log.__table__.c.get(arg_sorting_key)
        if sort_column is not None:
            if arg_sorting_direction == "desc":
                sort_column = sort_column.desc()
            query = query.order_by(sort_column)
        dag_audit_logs = session.scalars(query.offset(start).limit(logs_per_page)).all()
        return self.render_template(
            "airflow/dag_audit_log.html",
            dag=dag,
            show_trigger_form_if_no_params=conf.getboolean("webserver", "show_trigger_form_if_no_params"),
            dag_model=dag_model,
            root=request.args.get("root"),
            dag_id=dag_id,
            dag_logs=dag_audit_logs,
            num_log_from=min(start + 1, audit_logs_count),
            num_log_to=min(end, audit_logs_count),
            audit_logs_count=audit_logs_count,
            page_size=PAGE_SIZE,
            paging=wwwutils.generate_pages(
                current_page,
                num_of_pages,
                sorting_key=arg_sorting_key or None,
                sorting_direction=arg_sorting_direction or None,
            ),
            sorting_key=arg_sorting_key,
            sorting_direction=arg_sorting_direction,
        )
class ConfigurationView(AirflowBaseView):