I found a relieve method. As long as the activation material of the link object is consistent with the activation material of the original object, this problem can be avoided.
This may help anyone use libraries override model with different versions materials.
When using library override and object's material, the active material somtime will unexpectedly changed.
This should be a Blender Bug. I opened a Blener's bug report. It contains the bug reproduction step. https://developer.blender.org/T101552
I found a relieve method. As long as the activation material of the link object is consistent with the activation material of the original object, this problem can be avoided.
This may help anyone use libraries override model with different versions materials.