How do I set a shader property in MonoBehaviour?

I asked this question over at StackOverflow, everyone who answered seemed to think I was doing everything correctly, and couldn’t see what I was doing wrong exactly. Posting this here in case someone here knows.

https://stackoverflow.com/questions/56676219/how-do-i-set-a-shader-setting-property-at-runtime-using-monobehaviour/56685076#56685076

I suspect the issue is due to the fact that you are using renderer.material (this accessor generates a new material instance), rather than renderer.sharedMaterial.