Fix quant modelproto error (#23322)
### Description
Fixing
[issue](https://github.com/microsoft/onnxruntime/issues/23268#issuecomment-2579010227).
Saving a `ModelProto` with `save_as_external_data=True` updates its
metadata, which could lead to issues later if not managed carefully.
Using a deepcopy to prevent such problems.