but SourceKit-LSP ignores those include search paths. I have also tried to add those paths to the Swift Plugin for VSCode provided by SSWG, but this didn't work either.
Is the SourceKit-LSP ignoring unsafeFlags intentionally and if so, is there any workaround?
I have tried using swift package generate-xcodeproj and Xcode project works correctly (all the include paths are configured correctly).
You are probably best posting this in the sourcekit-lsp section of the forums. The VS Code extension is not involved at this point. The only time it gets involved is when you are adding cxxSettings via the command line build arguments
Point Swift: Path in the settings of the Swift VSCode plugin to /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-08-01-a.xctoolchain/usr/bin
and it started to compile the project really slowly, my M1 MacBook Pro (base model) is going 90 °C on CPU and 7200 rpm on fan. Also clangd is the most cpu% process right now. (Edit 2: It also requested 1.34 GB for project with ~ 200 lines of C++ and Swift code.) (Edit 3: Now clangd uses 624% of the CPU.)
clangd using so much CPU is definitely an unrelated bug and probably an issue of clangd itself and not sourcekit-lsp. Anyway, could you file a separate bug report for that issue and include a project that reproduces the issue (if possible)?