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



if "type" not in form_field_schema:
                form_field_value = form_field["value"]
                if isinstance(form_field_value, bool):
                    form_field_schema["type"] = "boolean"
                elif isinstance(form_field_value, int):
                    form_field_schema["type"] = ["integer", "null"]
                elif isinstance(form_field_value, list):
                    form_field_schema["type"] = ["array", "null"]
                elif isinstance(form_field_value, dict):
                    form_field_schema["type"] = ["object", "null"]
            
            if allow_raw_html_descriptions:
                if "description_html" in form_field_schema:
                    form_field["description"] = Markup(form_field_schema["description_html"])
                if "custom_html_form" in form_field_schema:
                    form_field_schema["custom_html_form"] = Markup(form_field_schema["custom_html_form"])
            else:
                if "description_html" in form_field_schema and "description_md" not in form_field_schema:
                    form_trust_problems.append(f"Field {k} uses HTML description")
                    form_field["description"] = form_field_schema.pop("description_html")
                if "custom_html_form" in form_field_schema:
                    form_trust_problems.append(f"Field {k} uses custom HTML form definition")
                    form_field_schema.pop("custom_html_form")
            if "description_md" in form_field_schema:
                form_field["description"] = wwwutils.wrapped_markdown(form_field_schema["description_md"])
        if form_trust_problems:
            flash(
                Markup(
                    "At least one field in the trigger form uses a raw HTML form definition. This is not allowed for "
                    "security. Please switch to markdown description via <code>description_md</code>. "