Reproduction steps:
1. Open the attached “ButtonOnClickPrivate” project
2. Open the “Assets/Scenes/SampleScene” Scene
3. In the Hierarchy window, select “Button” GameObject (Canvas > Button)
4. In the Inspector window, observe that the OnClick event is set to “TestScript.testMethod”
5. In the “Assets/TestScript” script, change “testMethod” function from public to private
6. Repeat steps 3 and 4
Expected result: The OnClick event is no longer “TestScript.testMethod” since its private
Actual result: The OnClick event remains “TestScript.testMethod”
Reproducible with: 2022.1.0a1, 2022.3.63f1, 6000.0.51f1, 6000.1.7f1, 6000.2.0b5
Reproducible on: macOS Sequoia 15.5 (M1 Max), Windows 11
Not reproducible on: No other environments tested