[Daniel Hernández] “Sony A7SII (mp4 1080p XAVCS). After I import the files creating optimized media and proxies, the event starts working fine but after a while some of the files start showing the red ! Modified Files message. If I close the FCPX and reopen it they appeared fine but then some other files go to the same message.”
I have seen this a few times and am not sure what causes it. FCPX maintains internal metadata about attributes of each file, at the time that file was imported. This includes audio channel config, audio sample rate, codec, file size, etc. Upon opening a library it compares that stored metadata to the current file attributes on disk. If any of them differ it shows a red box and says the file was modified.
For a group of files it won’t tell you which attributes are the problem. However if you pick a single file and try to relink it, it will then tell you.
Re how to fix this, it may make sense to run Disk Utility First Aid on all drive volumes. BTW any drive with FCPX content should ideally be HFS+ formatted not exFAT or anything else. After that I’d suggest rebuilding Spotlight indexes, since FCPX uses those for file access. It is conceivable some cached or corrupt data in the indexes are causing the problem: https://support.apple.com/en-us/HT201716
Digital Rebellion has a utility called QT Edit which allows editing the file metadata. I’ve never used it but it supposedly can fix this problem in some cases: https://www.digitalrebellion.com/promedia/