The desktop entry file has lines ending in CRLF instead of just LF. The Desktop Entry Specification is explicit that lines should end with only LF. The CR may be taken by some software as part of the field.
Running the following command against the given file removes any CR character in the file:
sed -i 's/\r//g' path/to/file
Refer to https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s03.html for details.