Select a Dollar sign in the variable name in Visual Studio Code

Open your Visual Studio Code Editor and find File > Preferences > Settings. The Default settings on the left and the User settings on the right. Put the following line of code in the settings.json of the User settings to solve the selecting issue:
// Place your settings in this file to overwrite the default settings
"editor.wordSeparators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
You don't need to restart the editor the effects are immediate.