WinSCP defaults to the binary mode. So if you have any kind of script, it must override the defaults.
Or you have changed the defaults in WinSCP GUI configuration and your script is not isolated from the GUI configuration.
If you need a more specific help, please attach a full session log file showing the problem.
To generate the session log file, use
/log=C:\path\to\winscp.logcommand-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.