Changing material property does not immediately happen in editor, but it does in a standalone build.

Perhaps you’re modifying a cloned Material value?

Materials materials array of materials renderer:

Generally accessing .material / .materials is going to give you a fresh copy. (See docs for why and when)