### Apache Airflow version

2.6.0b1

### What happened

When returning nested dictionary data from Task A and passing the returned value in Task B the deserialization fails if the data is nested dictionary with nonprimitive or iterable type.

```
Traceback (most recent call last):
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/models/abstractoperator.py", line 570, in _do_render_template_fields
    rendered_content = self.render_template(
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/template/templater.py", line 162, in render_template
    return tuple(self.render_template(element, context, jinja_env, oids) for element in value)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/template/templater.py", line 162, in <genexpr>
    return tuple(self.render_template(element, context, jinja_env, oids) for element in value)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/template/templater.py", line 158, in render_template
    return value.resolve(context)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/utils/session.py", line 76, in wrapper
    return func(*args, session=session, **kwargs)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/models/xcom_arg.py", line 342, in resolve
    result = ti.xcom_pull(
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/utils/session.py", line 73, in wrapper
    return func(*args, **kwargs)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/models/taskinstance.py", line 2454, in xcom_pull
    return XCom.deserialize_value(first)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/models/xcom.py", line 666, in deserialize_value
    return BaseXCom._deserialize_value(result, False)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/models/xcom.py", line 659, in _deserialize_value
    return json.loads(result.value.decode("UTF-8"), cls=XComDecoder, object_hook=object_hook)
  File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 359, in loads
    return cls(**kw).decode(s)
  File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/utils/json.py", line 122, in object_hook
    val = deserialize(dct)
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/serialization/serde.py", line 212, in deserialize
    return {str(k): deserialize(v, full) for k, v in o.items()}
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/serialization/serde.py", line 212, in <dictcomp>
    return {str(k): deserialize(v, full) for k, v in o.items()}
  File "/Users/utkarsharma/sandbox/astronomer/apache-airflow-provider-transfers/.nox/dev/lib/python3.10/site-packages/airflow/serialization/serde.py", line 206, in deserialize
    raise TypeError()
```

The way we are deserializing is by adding a [custom encoder](https://docs.python.org/3/library/json.html#encoders-and-decoders) for JSON and we are overriding the `object_hook` as shown below.
https://github.com/apache/airflow/blob/ebe2f2f626ffee4b9d0f038fe5b89c322125a49b/airflow/utils/json.py#L107-L126

But  if you try to run below code:
```
import json


def object_hook(dct: dict) -> dict:
    print("dct : ", dct)
    return dct


if __name__ == "__main__":
    val = json.dumps({"a": {"a-1": 1, "a-2": {"a-2-1": 1, "a-2-2": 2}}, "b": {"b-1": 1, "b-2": 2}, "c": {"c-1": 1, "c-2": 2}})
    print("val : ", val, "\n\n")
    return_val = json.loads(val, object_hook=object_hook)
```
Output:
```
val :  {"a": {"a-1": 1, "a-2": {"a-2-1": 1, "a-2-2": 2}}, "b": {"b-1": 1, "b-2": 2}, "c": {"c-1": 1, "c-2": 2}} 

dct :  {'a-2-1': 1, 'a-2-2': 2}
dct :  {'a-1': 1, 'a-2': {'a-2-1': 1, 'a-2-2': 2}}
dct :  {'b-1': 1, 'b-2': 2}
dct :  {'c-1': 1, 'c-2': 2}
dct :  {'a': {'a-1': 1, 'a-2': {'a-2-1': 1, 'a-2-2': 2}}, 'b': {'b-1': 1, 'b-2': 2}, 'c': {'c-1': 1, 'c-2': 2}}
```
`object_hook` is called with every decoded value. Because of this `deserialize` is getting called even with the deserialized data causing this issue.

deserialize function code:
https://github.com/apache/airflow/blob/ebe2f2f626ffee4b9d0f038fe5b89c322125a49b/airflow/serialization/serde.py#L174


### What you think should happen instead
Airflow should be able to Serialization/Deserialization without any issue

### How to reproduce

Refer - https://github.com/apache/airflow/pull/30798

Run below code:
```
import pandas as pd
from airflow import DAG
from astro import sql as aql 
from airflow.utils import timezone

with DAG("random-string", start_date=timezone.datetime(2016, 1, 1), catchup=False):
    @task
    def taskA():
        return {"foo": 1, "bar": 2, "baz": pd.DataFrame({"numbers": [1, 2, 3], "Colors": ["red", "white", "blue"]})}

    @task
    def taskB(x):
        print(x)

    v = taskA()
    taskB(v)
```

### Operating System

Mac - ventura

### Versions of Apache Airflow Providers

_No response_

### Deployment

Other

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [X] 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 __future__ import annotations
import json
from dataclasses import dataclass
from datetime import date, datetime
from typing import ClassVar
import numpy as np
import pendulum
import pytest
from airflow.datasets import Dataset
from airflow.utils import json as utils_json
@dataclass
class U: