I have run into the RawContent truncating in the past. We used the code below to open the message using the Message Body ID. We were then able to write the full message to a text file on the server.
set o = ##class(EnsLib.HL7.Message).%OpenId(qMBId)
set tSC = o.OutputToFile(fname)
I would guess it has something to do with the system not wanting you to use that account. When I look at the _Ensemble account, it says it is for "Internal use - not for login". I would assume the Locked Down code is now enforcing that restriction. This is based on the error saying "Cannot login as IRIS manager" which is what the account is also labeled. I have never tried to login with _Ensemble before so I'm not sure if it works in a non-Locked Down environment either.
I think you should be able to use something like “%PrimaryRequestHeader.SourceConfigName” to access values in the header. I have done it in a rule but haven't tried it in a DTL but I assume it will work the same way.
Update: %PrimaryRequestHeader is defined in Ens.BusinessProcess so I'm not sure you can reference it that way in the DTL.