### Apache Airflow version

2.5.0

### What happened

When accessing `dag_run.conf` via a task's context, I was able to add a value that is non-JSON serializable. When I tried to access the Dag Run List UI (`/dagrun/list/`) or the Dag's Grid View, I was met with these error messages respectively:

**Dag Run List UI**

```
Ooops!
Something bad has happened.

Airflow is used by many users, and it is very likely that others had similar problems and you can easily find
a solution to your problem.

Consider following these steps:

  * gather the relevant information (detailed logs with errors, reproduction steps, details of your deployment)

  * find similar issues using:
     * [GitHub Discussions](https://github.com/apache/airflow/discussions)
     * [GitHub Issues](https://github.com/apache/airflow/issues)
     * [Stack Overflow](https://stackoverflow.com/questions/tagged/airflow)
     * the usual search engine you use on a daily basis

  * if you run Airflow on a Managed Service, consider opening an issue using the service support channels

  * if you tried and have difficulty with diagnosing and fixing the problem yourself, consider creating a [bug report](https://github.com/apache/airflow/issues/new/choose).
    Make sure however, to include all relevant details and results of your investigation so far.
```

**Grid View**

```
Auto-refresh Error
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> </head> <body> <div class="container"> <h1> Ooops! </h1> <div> <pre> Something bad has happened. Airflow is used by many users, and it is very likely that others had similar problems and you can easily find a solution to your problem. Consider following these steps: * gather the relevant information (detailed logs
```

I was able to push the same value to XCom with `AIRFLOW__CORE__ENABLE_XCOM_PICKLING=True`, and the XCom List UI (`/xcom/list/`) did **not** throw an error.

In the postgres instance I am using for the Airflow DB, both `dag_run.conf` & `xcom.value` have `BYTEA` types.

### What you think should happen instead

Since we are able to add (and commit) a non-JSON serializable value into a Dag Run's conf, the UI should not break when trying to load this value. We could also ensure that one DAG Run's conf does not break the List UI for all Dag Runs (across all DAGs), and the DAG's Grid View.

### How to reproduce

- Set `AIRFLOW__CORE__ENABLE_XCOM_PICKLING=True`
- Trigger this DAG:
```
import datetime
from airflow.decorators import dag, task
from airflow.models.xcom import XCom

@dag(
    schedule_interval=None,
    start_date=datetime.datetime(2023, 1, 1),
)
def ui_issue():

    @task()
    def update_conf(**kwargs):
        dag_conf = kwargs["dag_run"].conf
        dag_conf["non_json_serializable_value"] = b"1234"
        print(dag_conf)

    @task()
    def push_to_xcom(**kwargs):
        dag_conf = kwargs["dag_run"].conf
        print(dag_conf)
        XCom.set(key="dag_conf", value=dag_conf, dag_id=kwargs["ti"].dag_id, task_id=kwargs["ti"].task_id, run_id=kwargs["ti"].run_id)

    return update_conf() >> push_to_xcom()


dag = ui_issue()
```
- View both the Dag Runs and XCom lists in the UI.
  - The DAG Run List UI should break, and the XCom List UI should show a value of `{'non_json_serializable_value': b'1234'}` for `ui_issue.push_to_xcom`.

### Operating System

Debian Bullseye

### Versions of Apache Airflow Providers

_No response_

### Deployment

Astronomer

### Deployment details

_No response_

### Anything else

The XCom List UI was able to render this value. We could extend this capability to the DAG Run List UI.

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

)
from airflow.compat.functools import cached_property
from airflow.configuration import AIRFLOW_CONFIG, conf
from airflow.datasets import Dataset
from airflow.exceptions import AirflowException, ParamValidationError, RemovedInAirflow3Warning
from airflow.executors.executor_loader import ExecutorLoader
from airflow.jobs.base_job import BaseJob
from airflow.jobs.scheduler_job import SchedulerJob
from airflow.jobs.triggerer_job import TriggererJob
from airflow.models import Connection, DagModel, DagTag, Log, SlaMiss, TaskFail, XCom, errors
from airflow.models.abstractoperator import AbstractOperator
from airflow.models.dag import DAG, get_dataset_triggered_next_run_info
from airflow.models.dagcode import DagCode
from airflow.models.dagrun import DagRun, DagRunType
from airflow.models.dataset import DagScheduleDatasetReference, DatasetDagRunQueue, DatasetEvent, DatasetModel
from airflow.models.mappedoperator import MappedOperator
from airflow.models.operator import Operator
from airflow.models.serialized_dag import SerializedDagModel
from airflow.models.taskinstance import TaskInstance, TaskInstanceNote
from airflow.providers_manager import ProvidersManager
from airflow.security import permissions
from airflow.ti_deps.dep_context import DepContext
from airflow.ti_deps.dependencies_deps import SCHEDULER_QUEUED_DEPS
from airflow.timetables._cron import CronMixin
from airflow.timetables.base import DataInterval, TimeRestriction
from airflow.utils import json as utils_json, timezone, yaml
from airflow.utils.airflow_flask_app import get_airflow_app
from airflow.utils.dag_edges import dag_edges
from airflow.utils.dates import infer_time_unit, scale_time_units
from airflow.utils.docs import get_doc_url_for_provider, get_docs_url