Below is a snippet from the top of my 2.1 UserEventScript. The log.debug shows up as {} but I was told it would contain the password I put in to the API Secrets manager for the secret with ID "custsecret_my_api_test". That's what I need it to do, rather than returning empty curly braces. The API Secret is set to allow all Domains and Scripts (no restrictions). I am running this script in our Sandbox account, but I created it in Production as well just in case the API always goes to Production or something, even when running from Sandbox. Same result.
define(["N/https"], function(https){
function handleAfterSubmit(context){
const myServerSecret = https.createSecureString({input: '{custsecret_my_api_test}'});
log.debug(myServerSecret);