After using Texture2D.SetPixel and Apply, can't reset texture using SetTexture

Please use code tags when posting code so it’s easier to read: Using code tags properly

Where does your image variable come from? Could it be that it points to the same texture as tex1, so your border code is changing your original texture and not a copy of it?