I went back and checked the photos I took on the same day and noticed that all photos in portrait mode are fine. The problem on exist on the landscape photos. Every photo in landscape mode is having the same issue. When I try to rotate a landscape photo, I also got the same error.
I just checked the “Additional Metadata” on the property panel on the right, all the portrait photos have a few additional lines, see screen snapshot, while on the landscape ones the last line shown is “Thumbnail Length”.
End of “Additional Metadata” for portrait photos without the metadata error -

End of “Additional Metadata” for landscape photos does not allow metadata modifications -

I know this problem is probably out of the scope of the software, but your help would be greatly appreciated.