Reproduction steps:
1. Open the attached project "sample-undo-events"
2. Open "SampleScene"
3. Duplicate "GameObject" under "Directional Light"
4. Undo the duplication
Expected result: "parentInstanceId: [Instance ID]" is logged in the Console
Actual result: "parentInstanceId: 0" is logged in the Console
Reproducible on: 2021.3.27f1, 2022.3.2f1, 2023.1.0f1, 2023.2.0a19
Reproducible on: macOS 13.2.1 (Intel), macOS 13.4 (M1)
Note: also reproducible when creating a new child and undoing the creation