In the LSP mode, stylua processes configuration relative to the CWD of stylua --lsp process, instead of the root directory passed by the LSP client in the initialize request.
This can lead to reformatting code with the wrong style: e.g. falling back to internal defaults. Unless we are lucky, often the CWD of the server process doesn't match and won't have the correct configuration files pertaining to the sources in question.
See neovim/nvim-lspconfig#4082