Why are builds of my crate's test not consistent (cargo build vs cargo test vs VSCode-Test-Explorer)

Thanks a lot for your helpful answer.
As of my Question 1) I am still trying to learn how to use cargo tree to corroborate and see the exact dependency with feature sets being different for both cases.....
As of my Question 2), your suggestion was really helpful. and I found indication, that rust-analyzer feature for TestExplorer uses env variable RUSTC_BOOTSTRAP, which causes re-builds of one of our dependencies: proc-macro2. For this I filed a more specific minimal reproducible example and question as follow up: VSCode - rust-analyzer cargo - annoying re-builds due to RUSTC_BOOTSTRAP changed.