Switching materials to a static mesh and then restore the original ones

Now it’s perfect!!!
Do you know why this generate some issues if my xray material is translucent?
With opaque material everything is perfect but as soon as i do an xray translucent material (to low opacity) the switch mat turns it material grid