UNDO is broken

It's better if you think of the feature as "undrop" rather than "undo." That is, what it remembers is when you drag a block someplace and then let go of it. There are other actions you could take that it can't undo.

A more general undo is on our list, but it's a major project and requires some design decisions. For example, you drag a block into a script while some scripts are active. Then you click undo. Do we try to undo what your program has done meanwhile? All the sprites? Maybe not. Maybe it depends on whether the script you modified was active at the time. I'm not sure. But suppose instead of dragging a block into a script you click the green flag, then click undo. Then it seems like undoing the program's actions probably is what the user wants.

So yeah, we know we should improve undo, but don't hold your breath.