I find it really strange you have to deselect any items to click the ‘local variables’ button. It should be available in the UI to be clicked no matter what else you have selected.
Side note: the window is very hard to use when working on the canvas and I constantly have to move it around all over the place just to use it, but I’m sure you’ve received a lot of feedback on this already given how poor it is.