This was caused by 8d8d358196
(changed the active layer to be an active node)
which overlooked the undo code.
This makes sure we save the name of the active node
in each undo step and set the active node based on this
name when decoding a step.
Pull Request: https://projects.blender.org/blender/blender/pulls/122195