On my system, I have a folder structure like this:
~/Git
|-- project-a
|---- Earthfile
|-- project-b
|---- Earthfile
If project-a is open in VS Code, and I open project-b/Earthfile as a single open file in the project-a open folder, earthly-ls output is filled with Message: unknown document errors on any LS request, like textDocument/hover, textDocument/semanticTokens/range, etc...