Blender viewport not updating while rendering

I am sure this has been answered but I couldn’t find the reason why Blender seems to not update viewport changes. It works just if you move an object and you press G again or enter edit then it suddenly updates the object position. Undo doesn’t even work.