How to correct character material in runtime

I’m making the character change at runtime, but when I make the change via blueprint the material is not automatically compiled, not showing the material correctly. Does anyone have any idea how to fix this so that the exchange can happen at runtime without this problem occurring in the materials?

Character A

Character B