Can't update floating menu attributes

Hi, i'm trying to change a menu item (as described here from the script section of another menu item.

I've tried using JavaScript as described in the link, but it doesn't work. Just to test if "update_menu_item" works, i switched to AppleScript, and it works, but intermittently.

Example JavaScript:

(async () => {
	updateDescription = { "BTTMenuItemText": "result"};
	await update_menu_item({"item_uuid": "C917977C-EB6D-4AF6-9F97-01098BBA615F", "json": JSON.stringify(updateDescription), "persist": true})
})();

Example AppleScript (which doesn't always work):

tell application "BetterTouchTool"
	update_menu_item menu_name "NotchMenu" item_name "myMenu" json "{BTTMenuItemBackgroundColor: '20, 200, 20, 255', BTTMenuItemText: 'qwerty' }" with persist
end tell

I've tried this script with BTT's built-in script editor and with MacOS' own Script Editor, and they both behave similarly; sometimes it works, sometimes it doesn't.

Has anyone gotten this to work with JavaScript ?

Thanks