However vscode thinks this is an error, but I can still compile it fine and it will still execute just fine, so I am not too sure why vscode thinks this is an error, is there a way to tell vscode this is not an error, or maybe tell rust-analyzer to ignore this two lines of code maybe or something?
Alternatively, don't try to move against the flow. It's expected that all the necessary files for the crate are stored under the crate root, and if you don't follow this expectation, something can always break.
If you have a set of common functions you use across multiple projects, you could out them all in a crate and then depend on this crate in the Cargo.toml of your projects.