Git detects changes for the whole file once opened but not changes were made. Using windows and vscode

I have created a repo on Github, and pushed exercise files to practice on. When I open one of these files and hit ctrl+save or add a single line of code the editor marks everything as changed. Even when I have made not changes or just a single line change.

For example, on the first image – I did not change anything but ctrl+save changed the formatting which should not be a problem.
enter image description here

In the second image, it is possible to see that almost the entire file changed but in reality is the same
enter image description here

I am using VSCode and Git with the latest updates on Windows.

Much appreciate any guidance!