You can already setup rust-analyzer to use different folder. I set Check On Save to check and in Check On Save: Extra Args to --target-dir target/rust-analyzer-target.
Check On Save
check
Check On Save: Extra Args
--target-dir target/rust-analyzer-target