The "documentchange" event does not fire on undo/redo if the instance's "name" property has been changed

If you change the name of the instance by calling the rename function, the documentchange event will fire and indicate that the name property has been changed, but if you undo/redo, this event will not fire.

Steps to reproduce:

  1. Place an instance of any component on the canvas, or select an existing one.
  2. Run the plugin with the documentchange event listener.
    ({documentChanges}) => {
  1. Change the name of the selected instance using Figma’s native rename function.
  2. Undo and redo the last action.

Expected result:
The documentchange event will fire and print an array of objects to the console.

Actual result:
The documentchange event does not fire.