Eevee update shading in edit mode?

I’m running some code that moves the mesh around in edit mode.
With eevee the shading effects like AO don’t update until I do something to trigger it.
Changing the active shape key, grabbing and moving a part of the mesh, popping out of edit mode…
I can’t find how to do this with python so the shading updates as the mesh moves.
Before grab:

After grab: