Deserialization issues with non-default dtypes
@AlexanderLutsenko Could you please try to use a different saving format as` tf.keras.models.save_model()` function.
This issue seems to be fixed in TF v2.16 or nightly. Hope this helps?
Thank you!`` @sushreebarsa I tried `.h5`, `.keras` and `SavedModel` formats, no luck. 
Yes, the problem is not present in `v2.16-nightly`, presumably because it switched to Keras 3. However, Keras 2 will still be supported as a standalone package for a while, so I figured it'd be worthwhile to report. @AlexanderLutsenko Yeah, thank you for raising such an issue! 
As the issue has been resolved in the nightly using Keras 3, it will be fixed after the new release. Could you please move this issue to closed status as the issue doesn't replicated in Keras 3.
Thank you! Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62209">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62209">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

tf v2.14.0-rc1-21-g4dacf3f368e

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

The following model cannot be deserialized:

```python
x = keras.Input(batch_shape=(4, 16), dtype=tf.float16)
output = 1.0 + x
keras_model = keras.Model(x, output)
```
It appears as if Keras fails to recognize the `dtype` of constants and always saves them as default type (`float32`/`int32`).
Setting `dtype` explicitly does not help:

```python
output = tf.convert_to_tensor(1, dtype=tf.float16) + x
```
The problem persists across various non-default data types (`float16`, `float64`, `int16`, `int64`), operations (`add`, `sub`, `mul`, `pow`) and model formats (`.h5`, `SavedModel`). Oddly enough, it goes away when the arguments are swapped:

```python
output = x + 1.0  # Works just fine!
```
In `v2.16-nightly`, which resolves to Keras 3, everything's alright.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
from tensorflow import keras


x = keras.Input(batch_shape=(4, 16), dtype=tf.float16)
output = tf.convert_to_tensor(1, dtype=tf.float16) + x
keras_model = keras.Model(x, output)

model_path = 'model.h5'
keras_model.save(model_path)
print('Model saved')

keras_model_restored = keras.models.load_model(model_path)
print('Model loaded')
```


### Relevant log output

```shell
TypeError: Exception encountered when calling layer "tf.__operators__.add" (type TFOpLambda).

Input 'y' of 'AddV2' Op has type float16 that does not match type float32 of argument 'x'.

Call arguments received by layer "tf.__operators__.add" (type TFOpLambda):
  • x=tf.Tensor(shape=(), dtype=float32)
  • y=tf.Tensor(shape=(4, 16), dtype=float16)
  • name=None
```
