Short answer is no, since the linter options are defined globally (on a oer project basis).
Long answer, there are probably ways to “hack” vscode and gfortran by passing environmental settings but I would not recommend it.
The long term plan to address this is to integrate with fpm and cmake serving lint diagnostics based on the build system options.