Make the IDE understand the headers in `lib_extra_dirs`?

If I add cpp/h files to subdirectories of the directory specified in lib_extra_dirs, compilation works, but the IDE (VS Code) shows red underlines for the header files, and does not show any IntelliSense help. Pressing F12 to jump to definition works, though.

I know I could add an arbitrary header path to the “Include path” setting manually, but is there a way to make the IDE automatically understand that it needs to search the lib_extra_dirs directory? Or is manually adding the header directory to the settings is the only way?

Ctrl+Shift+P → Rebuild IntelliseSense in VSCode.