Please use the -No to set the encryption option as optional. Reference: Connecting with sqlcmd.
If the connection doesn't succeed, you can add the -No option to sqlcmd to specify that encryption is optional, not mandatory.