How to force refresh UE viewport from another application

I am controlling UE from a remote python process using the I can translate the actors in the scene, and I can see their location is updated in the Details panel, but the Viewport is not updated if the UE window is not in focus, it is only updated when I activate the UE window.

How can I force refreshing of the Viewport?

I tried unreal.EditorLevelLibrary.editor_invalidate_viewports() but it does not help.