Symbol rename in current file only?

I tried to change a variable name using the “F2” key in the main.cpp, but VS Code showed matches found in the library header files in the “REFACTOR PREVIEW”. I could uncheck all other files than “main.cpp”, but this has a potential to cause errors because I may forget to uncheck one. Is there a command or trick to rename a symbol only within the current file?

This is a VSCode issue. The refactoring in there offered by Microsoft is a bit laughable when looking at e.g. CLion (which PlatformIO also has a plugin for).

According to articles like Pro tips for Visual Studio Code to be productive in 2018 👨🏻‍💻 | by Ankur Biswas | Medium and Refactor local variable name using Visual Studio Code - Stack Overflow, the combination Ctrl+F2 should only affect the current file.