P: Save Metadata To File corrupts .avif image
LR corrupts an .avif image when it tries to write the file's metadata. To reproduce:
1. Import this .avif:
https://www.dropbox.com/s/81x4nrskg541ekj/sample-avif.2023.05.04.avif?dl=0
2. Select the imported photo and do Metadata > Save Metadata To File.
3. Observe these errors:


4. Open the file in Photoshop 2023 and observe this error:

(PS has no problems opening the original file.)
Tested on LR 12.4, PS 24.5.0, Mac OS 13.4.
