The docs say:
Every node has an id property, which is unique within the document. If the id is invalid, or the node cannot be found (e.g. removed), returns null.
figma | Plugin API
But I’ve found as I’m developing my plugin that this is not true. When you alt drag a layer, the children within it have ids that are not unique. Is there a workaround?