tl;dr Command-Z and Shift-Command-Z somehow stopped being associated with Undo/Redo, and instead caused the last file functions to be undone/redone (renaming a file, creating a file, creating a folder, etc.). Note that the menu still indicates those two keys as shortcuts to Undo/Redo
I’m editing a project, and I have multiple files open. I created a new folder and a new file within the new folder, and started typing text into the file. So far, so good. I made what I thought was a typing mistake and hit the “delete” key, then realized that it was not a mistake, so I hit Command-Z (the shortcut for Undo), and the filename reverted to the default “untitled.txt”. Then I hit Shift-Command-Z (the shortcut for Redo) and the filename reversion was undone. So I typed some more text and went to the Edit menu and hit “Undo” and the text disappeared (as I would expect).