Custom UI Shader - Refresh?

This post is the first hit on my favourite search engine, but doesn’t cover a proper solution. More discussion is here: Masked UI Element's Shader Not Updating

for me using materialForRendering.SetXYZ made it work.