You mean they are supposed to be living, moving, doing all sorts of things under the hood, when they are not rendered ?
If this is so, You will have to code them as persistent objects, not as Node2D inheristants, but just Node. They will have to execute their behavior code in process or setget or on_timeout at all times. Switching scenes should only trigger creating sprites and visualizing behavior of only these NPCs, that are supposed to belong to new scene.