Blender Version:
I'm using 3.4, but it always had this issue even in other versions
Description:
If you are working in the geometry nodes editor and enter in edit mode on that object or another object. if you try undoing [ctrl z] it will take you back to the state the node tree was in when you changed modes, after pressing undo [ctrl z] the amount of times as actions you did since you changed modes.
this is a long standing problem and I never remember it ever working properly.