I would like to traverse all PropertyModifications (retrieved via PrefabUtility.GetPropertyModifications(instance)), compare instance value with prefab value, and eventually revert the modification via PrefabUtility.RevertPropertyOverride. For reverting I need the SerializedProperty of the instance object, but the PropertyModification only has a reference to the prefab object. In a more complex prefab, with eventually nested prefabs, variants etc… I dont see a way to access the corresponding instance property to call RevertPropertyOverride.
Another way to do this would be traversing all SerializedProperties of a prefab instance and check whether SerializedProperty.prefabOverride is true. But then I dont see any way to access the prefab value which is overridden for comparison.