The following workaround worked for me ✔️
I wanted to exclude /node_modules but include /node_modules/asch-core for search.
In the .vscode/settings.json file I configured:
{
"search.exclude": {
"**/node_modules/": true,
},
"search.useIgnoreFiles": false,
"search.useGlobalIgnoreFiles": false
}
search.useIgnoreFiles: false → search uses .gitignore files: no search.useGlobalIgnoreFiles: false → search uses global .gitignore files: no
On the left panel I untoggled the "Use Exclude Settings and Ignore Files" _ Then I added the directory I wanted to include (in my case: /node_modules/asch-core, ./*) into the files to include TextBox.