I have several instances of photos where PS decides to keep the Orientation tag from the picture and ignore the one in the sidecar file. The same happens with keyword tags : old keywords I deleted years ago are coming back.
I use DigiKam and I configured it to write metadata exclusively to the sidecars and never touch the originals. This means that the metadata between the photo file (e.g. the .jpg) and the sidecar (the corresponding .xmp) is not the same and that only the sidecar contains up to date tags.
How does PS resolves tags between a file and its sidecar when they have different values ?