Does this always happen when you undo, or only sometimes?
Do you get any error logs in the console at all?
Please let me know!
Thank you.
(PS: By the way, what I see in your screenshot is only an Editor GUI thing and there should be no data loss, so if you enter exit play mode for example nodes will go back to normal.)