How to reproduce:
1. Open the attached “IN-14325” project
2. Open the “Test → TestWindow” window in the menu
3. Press the “Spacebar” key on the keyboard
Expected result: Two child elements are successfully removed without any errors
Actual result: Elements are removed with NullReferenceException and ArgumentException error messages spammed in the Console log
Reproducible with: 2021.3.9f1, 2022.1.16f1, 2022.2.0b7, 2023.1.0a9
Couldn't test with: 2020.3.39f1 (some features aren't available)
Reproduced on: macOS 12.5 (Intel)
Thrown errors:
NullReferenceException: Object reference not set to an instance of an object
ArgumentException: This VisualElement is not my child
Note: On some versions, if no error is thrown after the first press,
one should press the key again after ~10 sec. delay