Fix 'Permission Denied' Error When Saving VS Code settings.json - Fixing 'Command Not Found' in VS Code Terminal-Git index.lock Error: How to Fix It

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.