The problem was the "Set upload/monitor/test port" on VS Code was not set to AUTO, but to COM5.
Setting it to AUTO fixed the issue.