Solution
Uninstall the code command and reinstall it.
Steps:
- Open VSCode and press Shift+Command+P to bring up the Command Palette.
- Select Shell Command: Uninstall 'code' command from PATH.
- Press Shift+Command+P again to open the Command Palette.
- Select Shell Command: Install 'code' command in PATH.