Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/MainScene” Scene
3. Enter Play Mode
4. In the Hierarchy window, select the “SceneController” GameObject
5. In the Inspector window, open the context menu of “Scene Controller” script
6. In the context menu, select “RestartScene”
7. Observe the logged execution order in the Console
Expected result: OnDestroy() is executed in the “Scene Controller” script first and then in the “Test Behaviour” script
Actual result: A custom warning message is logged, that OnDestroy() was called in “Test Bahaviour” script before “Scene Controller” script
Reproducible with: 2021.3.40f1, 2022.3.38f1, 6000.0.11f1
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Note: The issue does not always reproduce, so steps 4-7 might need to be repeated multiple times