Model weights cannot be saved 
Hi @gcelano,

In Keras3, In order to save weights using model.save_weights method you need to add `.weights.h5` extension to the path.

`model.save_weights('dir/my_model.weights.h5')`

Please check the [doc](https://keras.io/api/models/model_saving_apis/weights_saving_and_loading/#load_weights-method) source for same. These issues might share common themes or underlying causes related to saving and loading model weights in TensorFlow. Exploring them further could provide insights into resolving the "Model weights cannot be saved" issue. #65279 , #62483 ,  #61859 ,  #61279 ,  #60064 , #59287 @SuryanarayanaY , in my code at link above I use ".weights.h5", and this has no impact on the problem. @testhowtest, is there a provisional workaround? Without saving, there is not much use in using TF  
### Issue type

Bug

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

No

### Source

source

### TensorFlow version

2.16.1 and inferior

### Custom code

Yes

### OS platform and distribution

Debian 12 Bookworm

### 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?

After `model.save_weights` is used, if a new process is started and `model.load_weights` is used, the results produced by the model are poor (very different from the ones at training time).  The code can be found at https://git.informatik.uni-leipzig.de/celano/dithrax_test (with instructions).

(Since it is not clear if it is a keras or tensorflow problem, an issue has also been opened at https://github.com/keras-team/keras/issues/19693#issuecomment-2125675600)

### Standalone code to reproduce the issue

```shell
https://git.informatik.uni-leipzig.de/celano/dithrax_test
```


### Relevant log output

_No response_