Prefab running without in the scene

Hi there.
Recently In my unity editor, when I open prefab editor or tab. and press play. that prefab, without being in the game world. still runs. however. if I do not have that prefab edit mode. then the code does not run, I am using unity version 2021.3.33f1

If it’s not clear enough,
I have prefab tab opened in scene view. not closing it and upon pressing play while that prefab is open. that prefab’s script seems to run without existing in the game hierarchy. and the script wont run if i don’t have that edit mode open.

I would like to know if I’m reporting a bug. or it’s an intended feature.

Hard to say without seeing the code. It sounds like maybe you’re using a constructor in a MonoBehaviour rather than Awake(). If you are then this can have a lot of weird side effects e.g. triggers when opening the prefab in the editor. Or it could be related to attributes like ExecuteInEditMode. Maybe try a basic MonoBehaviour that duplicates the issue with a debug log and post it here.