How to update shader properties in viewport in realtime?

I have a basic scene with a plane and a sphere. The unlit shader on the plane has a vector property that receives the position of the sphere, which I use to draw a circle on the plane (proximity effect).

This works as intended in play mode but I’d also like to see the shader update in the viewport as I move the sphere around with the gizmo.

I know this is happening because the property is being set in Update(), which is only called during play but I can’t seem to find a workaround for updating in the editor.

Is there a global Update() function for the viewport window somewhere?
I’m using URP.

In editor:

In game:

Set property script:

public class SphereScript : MonoBehaviour
{
    public GameObject plane;
    public Renderer planeRend;

    void Start()
    {
        plane = GameObject.Find("PlaneThing");
        planeRend = plane.GetComponent<Renderer>();
    }

    void Update()
    {
        planeRend.material.SetVector("_PlayerPos", gameObject.GetComponent<Transform>().position);
    }
}

Put [ExecuteAlways] keyword right above the class. Just like this:

[ExecuteAlways]
public class SphereScript : MonoBehaviour

Also I would rather assign the ‘plane’ variable in the editor, just in case it’s not null if the ‘Start’ method is not executed