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



"""Process form data."""
        conn_id = form.data["conn_id"]
        conn_type = form.data["conn_type"]
        
        
        
        extra = {}
        extra_json = form.data.get("extra")
        if extra_json:
            try:
                extra.update(json.loads(extra_json))
            except (JSONDecodeError, TypeError):
                flash(
                    Markup(
                        "<p>The <em>Extra</em> connection field contained an invalid value for Conn ID: "
                        "<q>{conn_id}</q>.</p>"
                        "<p>If connection parameters need to be added to <em>Extra</em>, "
                        "please make sure they are in the form of a single, valid JSON object.</p><br>"
                        "The following <em>Extra</em> parameters were <b>not</b> added to the connection:<br>"
                        "{extra_json}"
                    ).format(conn_id=conn_id, extra_json=extra_json),