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



owner_links_dict = DagOwnerAttributes.get_all(session)
            import_errors = select(errors.ImportError).order_by(errors.ImportError.id)
            if not get_auth_manager().is_authorized_dag(method="GET"):
                
                import_errors = import_errors.join(
                    DagModel, DagModel.fileloc == errors.ImportError.filename
                ).where(DagModel.dag_id.in_(filter_dag_ids))
            import_errors = session.scalars(import_errors)
            for import_error in import_errors:
                flash(
                    f"Broken DAG: [{import_error.filename}] {import_error.stacktrace}",
                    "dag_import_error",
                )
        from airflow.plugins_manager import import_errors as plugin_import_errors
        for filename, stacktrace in plugin_import_errors.items():
            flash(
                f"Broken plugin: [{filename}] {stacktrace}",
                "error",
            )
        num_of_pages = math.ceil(num_of_all_dags / dags_per_page)
        state_color_mapping = State.state_color.copy()
        state_color_mapping["null"] = state_color_mapping.pop(None)
        page_title = conf.get(section="webserver", key="instance_name", fallback="DAGs")
        page_title_has_markup = conf.getboolean(
            section="webserver", key="instance_name_has_markup", fallback=False
        )
        dashboard_alerts = [
            fm for fm in settings.DASHBOARD_UIALERTS if fm.should_show(get_airflow_app().appbuilder)
        ]
        def _iter_parsed_moved_data_table_names():