`tf.math.reduce_sum`'s `name` property doesn't change in `model.compile`
@ubless607 
In order to expedite the trouble-shooting process, please provide the complete code snippet to reproduce the issue reported here. Please share all the dependencies [here](https://colab.research.google.com/gist/sushreebarsa/97272f7c7ea8dfcce3a2842680c7fe6e/61284.ipynb). Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. 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/61284">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/61284">No</a>

### Issue type

Bug

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

No

### Source

source

### TensorFlow version

tf 2.13

### Custom code

No

### OS platform and distribution

Linux Ubuntu 18.04.6 LTS

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

```
...
out = tf.math.reduce_sum(tf.cast(position> 0.5, tf.float32), axis=-1, keepdims=True, name='final')
model = models.Model(inputs=input_, outputs=[position, out])

model.summary()

=============================================================
...
tf.math.reduce_sum (TFOpLambda  (None, 1)           0           ['tf.cast[0][0]']                 )   
==============================================================
```

### Standalone code to reproduce the issue

```shell
input_ = layers.Input(shape=(3))
position = layers.Dense(5, 'sigmoid', name='position')(input_)
out = tf.math.reduce_sum(tf.cast(position> 0.5, tf.float32), axis=-1, keepdims=True, name='final')
model = models.Model(inputs=input_, outputs=[position, out])

model.summary()
```


### Relevant log output

_No response_