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



"Raw HTML is deprecated and must be enabled via "
                    "<code>webserver.allow_raw_html_descriptions</code> configuration parameter. Using plain text "
                    "as fallback for these fields. "
                    f"<ul><li>{'</li><li>'.join(form_trust_problems)}</li></ul>"
                ),
                "warning",
            )
        if allow_raw_html_descriptions and any("description_html" in p.schema for p in dag.params.values()):
            flash(
                Markup(
                    "The form params use raw HTML in <code>description_html</code> which is deprecated. "
                    "Please migrate to <code>description_md</code>."
                ),
                "warning",
            )
        if allow_raw_html_descriptions and any("custom_html_form" in p.schema for p in dag.params.values()):
            flash(
                Markup(
                    "The form params use <code>custom_html_form</code> definition. "
                    "This is deprecated with Airflow 2.8.0 and will be removed in a future release."
                ),
                "warning",
            )
        ui_fields_defined = any("const" not in f["schema"] for f in form_fields.values())
        show_trigger_form_if_no_params = conf.getboolean("webserver", "show_trigger_form_if_no_params")
        if not dag_orm:
            flash(f"Cannot find dag {dag_id}")
            return redirect(origin)
        if dag_orm.has_import_errors:
            flash(f"Cannot create dagruns because the dag {dag_id} has import errors", "error")