We need to ensure that the compositor preview depsgraph gets updated properly after undo, now that the compositing node tree is not embedded in the scene anymore. A test case will be committed separately in #140595 Pull Request: https://projects.blender.org/blender/blender/pulls/140596