I know this is old but I just encountered the issue in my team (some mac, some linux, some windows , all vscode).
solution was to set the line ending in vscode's settings:
.vscode/settings.json
{
"files.eol": "\n",
}
https://qvault.io/2020/06/18/how-to-get-consistent-line-breaks-in-vs-code-lf-vs-crlf/