Specifically https://github.com/rust-analyzer/rust-analyzer/blob/ed4b312fa777ebb39ba1348fe3df574c441a485e/crates/rust-analyzer/src/cli/load_cargo.rs#L44-L63
I was surprised, because the comment says "this function is used by external tools that use rust-analyzer as a library" - but it then promptly re-executes RA.
I was able to work around via environment variables in my binary code, but I couldn't find this gotcha documented anywhere (in particular, in ARCHITECTURE.md).