### 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
ERR_FAIL_COND_MSG(!profilers.has(p_name), "Profiler not registered: " + p_name);
	profilers[p_name]->unbind();
	profilers.erase(p_name);
}
bool EngineDebugger::is_profiling(const StringName &p_name) {
	return ::EngineDebugger::is_profiling(p_name);
}
bool EngineDebugger::has_profiler(const StringName &p_name) {
	return ::EngineDebugger::has_profiler(p_name);
}
void EngineDebugger::profiler_add_frame_data(const StringName &p_name, const Array &p_data) {
	::EngineDebugger::profiler_add_frame_data(p_name, p_data);
}
void EngineDebugger::profiler_enable(const StringName &p_name, bool p_enabled, const Array &p_opts) {
	if (::EngineDebugger::get_singleton()) {
		::EngineDebugger::get_singleton()->profiler_enable(p_name, p_enabled, p_opts);
	}
}
void EngineDebugger::register_message_capture(const StringName &p_name, const Callable &p_callable) {
	ERR_FAIL_COND_MSG(captures.has(p_name) || has_capture(p_name), "Capture already registered: " + p_name);
	captures.insert(p_name, p_callable);
	Callable &c = captures[p_name];
	::EngineDebugger::Capture capture(&c, &EngineDebugger::call_capture);
	::EngineDebugger::register_message_capture(p_name, capture);
}
void EngineDebugger::unregister_message_capture(const StringName &p_name) {