Changes to Texture2D persist after I stop playing

I’m modifying a Texture2D with SetPixel(), but when I stop playing my game the changes are still present in the scene view and the next time I play my game. I have to close Unity and restart it to have my texture reset to its original state.

How can I have my Texture2D reset when I stop playing my game without restarting Unity?

Before you manipulate your texture, make a copy:

var tex : Texture2D = Instantiate(renderer.material.mainTexture) as Texture2D;
renderer.material.mainTexture = tex;