### Godot version

v4.1.stable.official [970459615]

### System information

Godot v4.1.stable - Ubuntu 22.04.2 LTS 22.04 - Vulkan (Mobile) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i5-1235U (12 Threads)

### Issue description

Opening the project and connecting to the language server with VScode causes error messages to appear on the editor output. This happens even on a empty project I just created to test. This seems to stop if i disable the "use thread" box on `Editor Settings>Network>Language Server`. But, by doing it, suggestions and syntax checking on VScode to become very slow :smiling_face_with_tear: 

Saving the file on VScode (any file, even without any changes) causes the errors to be logged again.

Im using geequlim.godot-tools extension.

```
Godot Engine v4.1.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
  modules/gltf/register_types.cpp:73 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
--- Debug adapter server started ---
--- GDScript language server started ---
[LSP] Connection Taken
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7513/@RichTextLabel@7515). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7513/@RichTextLabel@7515). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7513/@RichTextLabel@7515). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7513/@RichTextLabel@7515). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7513/@RichTextLabel@7515). Use call_deferred() or call_thread_group() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7517/@Button@7528) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7517/@Button@7528). Use call_deferred() or call_thread_group() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@PanelContainer@7498/@VBoxContainer@7499/@EditorLog@7529/@VBoxContainer@7517/@Button@7528) can only be accessed from the main thread. Use call_deferred() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637). Use call_deferred() or call_thread_group() instead.

```

Saving the file on VScode:

```
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@EditorFileSystem@694). Use call_deferred() or call_thread_group() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@ConfirmationDialog@11194) can only be accessed from the main thread. Use call_deferred() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10643/@ItemList@10646). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10643/@ItemList@10646). Use call_deferred() or call_thread_group() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@ItemList@10659). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@ItemList@10659). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@ItemList@10661). Use call_deferred() or call_thread_group() instead.
  Caller thread can't call this function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@ItemList@10661). Use call_deferred() or call_thread_group() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@HBoxContainer@10654/@Button@10656) can only be accessed from the main thread. Use call_deferred() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@ItemList@10659) can only be accessed from the main thread. Use call_deferred() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653) can only be accessed from the main thread. Use call_deferred() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394/@VBoxContainer@10637/@HSplitContainer@10640/@VSplitContainer@10642/@VBoxContainer@10653/@ItemList@10661) can only be accessed from the main thread. Use call_deferred() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
  This function in this node (/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@WindowWrapper@11395/@ScriptEditor@11394) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
``` 

 

### Steps to reproduce

It happens even on a empty project. Just create one and connect to language server with VScode

### Minimal reproduction project

N/A
switch (p_what) {
		case NOTIFICATION_ENTER_TREE: {
			start();
		} break;
		case NOTIFICATION_EXIT_TREE: {
			stop();
		} break;
		case NOTIFICATION_INTERNAL_PROCESS: {
			if (started && !use_thread) {
				protocol.poll();
			}
		} break;
		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
			String remote_host = String(_EDITOR_GET("network/language_server/remote_host"));
			int remote_port = (int)_EDITOR_GET("network/language_server/remote_port");
			bool remote_use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
			if (remote_host != host || remote_port != port || remote_use_thread != use_thread) {
				stop();
				start();
			}
		} break;
	}
}
void GDScriptLanguageServer::thread_main(void *p_userdata) {