The file had extra characters which aren't visible in normal editors, as mentioned by @Alik and @Vijayst
So, I tried to drill more into it on how one file didn't have extra characters but other file had extra hidden characters. I narrowed it down to PowerShell commands for creation of new files.
Editor: Visual Studio Code
Terminal: PowerShell
Commands used for new file creation: "New-Item" and "Out-File"
"New-Item": This command creates new empty file.
"Out-Fife": This command creates new empty file with hidden characters.
I created one of the file by using "Out-File" command which added extra characters in the beginning.
-----DO NOT use "Out-File" command in Visual Studio Code terminal for creating new files.-----