### Godot version

Godot 4.1-dev (ed63b9ea23)

### System information

Manjaro Gnome

### Issue description

`thread.start(test.bind(0))` prints the following error:

```
ERROR: Caller thread can't call this function in this node. Use call_deferred() or call_thread_group() instead.
   at: get_script (scene/main/node.cpp:3536)
```



### Steps to reproduce

```
func _ready() -> void:
	var thread := Thread.new()
	thread.start(test.bind(0))

func test(i: int) -> void:
	pass
```

### Minimal reproduction project

N/A
for (const KeyValue<StringName, Callable> &E : captures) {
		::EngineDebugger::unregister_message_capture(E.key);
	}
	captures.clear();
}
EngineDebugger *EngineDebugger::singleton = nullptr;
void EngineDebugger::_bind_methods() {
	ClassDB::bind_method(D_METHOD("is_active"), &EngineDebugger::is_active);
	ClassDB::bind_method(D_METHOD("register_profiler", "name", "profiler"), &EngineDebugger::register_profiler);
	ClassDB::bind_method(D_METHOD("unregister_profiler", "name"), &EngineDebugger::unregister_profiler);
	ClassDB::bind_method(D_METHOD("is_profiling", "name"), &EngineDebugger::is_profiling);
	ClassDB::bind_method(D_METHOD("has_profiler", "name"), &EngineDebugger::has_profiler);
	ClassDB::bind_method(D_METHOD("profiler_add_frame_data", "name", "data"), &EngineDebugger::profiler_add_frame_data);
	ClassDB::bind_method(D_METHOD("profiler_enable", "name", "enable", "arguments"), &EngineDebugger::profiler_enable, DEFVAL(Array()));
	ClassDB::bind_method(D_METHOD("register_message_capture", "name", "callable"), &EngineDebugger::register_message_capture);
	ClassDB::bind_method(D_METHOD("unregister_message_capture", "name"), &EngineDebugger::unregister_message_capture);
	ClassDB::bind_method(D_METHOD("has_capture", "name"), &EngineDebugger::has_capture);
	ClassDB::bind_method(D_METHOD("send_message", "message", "data"), &EngineDebugger::send_message);
}
}