Repository: godot
Issue: After initialize request LSP sometimes responds incorrectly
Labels: bug,topic:editor,topic:plugin

### Godot version

4.1 dev [950f4c3b41]

### System information

Godot v4.1.rc (950f4c3b4) - Ubuntu 22.10

### Issue description

On first connect to the language server, the response to `initialize` request is `textDocument/publishDiagnostics` instead of the proper `InitializeResult` as stated in the [specs](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize).

A second connect produces a valid response.


A log from the client I noticed this from, not sure where I could find the relevant from Godot
<details><summary>Log</summary>

```
2023-06-27T21:32:06.607 helix_lsp::transport [INFO] gdscript -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"positionEncodings":["utf-8","utf-32","utf-16"]},"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"deprecatedSupport":true,"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"versionSupport":true},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":true},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"inlayHint":{"refreshSupport":false},"symbol":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true,"failureHandling":"abort","normalizesLineEndings":false,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"helix","version":"23.05 (06d63d6a)"},"processId":204059,"rootPath":"/x/Projects/MyProject","rootUri":"file:///x/Projects/MyProject","workspaceFolders":[{"name":"MyProject","uri":"file:///x/Projects/MyProject"}]},"id":0}
2023-06-27T21:32:06.615 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 8.182597ms)
2023-06-27T21:32:06.616 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-06-27T21:32:06.691 helix_lsp::transport [INFO] gdscript <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///x/Projects/MyProject/TheTopmostScriptInFileBrowser.gd"}}
```

</details> 


### Steps to reproduce

1. Open project
2. Connect nc language server
3. Open a gdscript in an editor that has the language server configured

```toml
[language-server.gdscript]
command = "nc"
args = ["127.0.0.1", "6008"]

[[language]]
name = "gdscript"
language-servers = ["gdscript"]
```

### Minimal reproduction project

n/a, reproduction can be done with default project that has a .gd file added