I've facing the same issue with Qlik Sense Desktop, but the connection with a Qlik Sense Cloud Basic account works just fine.
I compared the scripts generated by a Desktop and a Cloud, it seems the only different is the connection line which the Cloud one has the identifier inserted.
LIB CONNECT TO [DM];
LIB CONNECT TO [DM (qlikcloud_qlikid_<cloud_account_username>)];
I tried to run the Cloud script on the Desktop, but the following errors return. Without the identifier, it will return the (400) Bad Request error
The following error occurred:
Could not fetch connection by name using identifier DM (qlikcloud_qlikid_xxxxx)
The error occurred here:
LIB CONNECT TO [DM (qlikcloud_qlikid_xxxxx)]