While currently the ActionStackView is disabled when the scene becomes active, it is still possible to do undo/redo via the Menu and the Hotkeys.
To solve the issue the canUndoChanged and canUndoChanged slots have to fire when the scene becomes active / inactive. And the undo / redo slots need to check if the scene is active.