Glad I set project-files-relative-names to t and have been testing. This side-effect in Eglot is sure to bite other people who are teased by the NEWS of this new option, despite not being a defcustom.
If it is not intended to be set (yet? ever?), perhaps update the docstring to indicate this. I do tend to agree with Joao that the API to project-files probably could have an optional additional argument vs. a global, especially if the intention is merely to influence a specific call-site's expected results.
WRT to Eglot using relative as default, in this context it is looking for directory components and relative names might need to be adorned at least with "./" so that file-name-directory doesn't fail. Perhaps project-files-relative-names could be set to a symbol such as 'retain-relative-directory-component.