How do I change a StaticMesh's in UStaticMeshComponent without affecting the original mesh itself?

I’ve found the issue. I was creating the dynamic material and trying to set the component’s material in the constructor. After moving it to BeginPlay I can set it to the component and it works :man_shrugging: