Change a value in the inspector on the right. For instance, I set the Radius to 2, and then focus out (either by pressing tab or selecting another field. I doesn’t only happen for prefabs, same when I select a game object in the scene and change a value in the inspector (although it’s not consistent). BUT, it doesnt happen when I select an image in the Project window for instance and changes its settings.
What Unity version? Is there an updated version you can update your project to?
Any inspector addons potentially interfering? I’ve not experienced this in either the latest 2021 or 2023 versions.
It might not be related, but I see the hot-reload plugin. That seems to be a constant source of issues from what I’ve seen, so perhaps pull that out and test.
No, it isn’t expected. But it is very likely that it is a custom script somewhere. Something does unselect your item. You can try to find out what is causing it if you make a list about everything in your project which isn’t Unity official package (it is very unlikely that those cause thing, although who knows, obviously), you either start to remove those plugins one by one and check after each removal if the issue is still there or try to create a new project and add the one by one and check it the issue appears.
@ niuage did you ever resolve the issue? I’m having the same problem on latest 2021 LTS, something just keeps closing my inspector whenever I change any value. Very frustrating, drives me nuts, I have to manually lock the inspector every time I want to change something in a prefab.