How it works
Photoshop keeps metadata in the PSD “image resources” section: resource 1058 holds EXIF and 1060 holds XMP. The editor replaces only those two blocks and leaves layers, masks and the composite image untouched. Photoshop shows the result under File → File Info.
Frequently asked questions
Will my PSD layers be flattened?
No – as long as you keep PSD as the output format.
Can I export the PSD to WebP or PNG?
Yes. Choose a web format as output; the flattened composite is exported with your metadata.