- Open VS Code.
- Click on File.
- Then find Preferences -> settings.
- Click on the Text Editor in the left side menu.
- Locate the Render Line Highlight Only When Focus Setting.
- Check or uncheck: controls if the editor should render the current line highlight only when the editor is focused.