Renaming a variable rewrites every occurrence of its name across your project files (excluding qualified references like Foo.X). The in-memory entry is updated too.
Using the Variables view: hover over a variable and click the inline Rename button (edit icon).
Using the Command Palette: run AutomationView: Rename Variable, then enter the new name.
If the variable is not referenced in any scanned file, AutomationView reports that no occurrences were found, even though the in-memory name is updated.