this works in Ps 23.5
photoshop.core.executeAsModal(function _executeAsModal(){
return photoshop.action.batchPlay([{
_obj: "set",
_target: [{ _ref: "property", _property: "layerSectionExpanded" }, { _ref: "layer", _id: 1234 }],
to: true // true to open/expand, false to collapse/close
}], {}).then(res=>{
return 'should be expanded now';
});
},
{ commandName: 'open/expand group layer' }
).then(console.log).catch(console.error);
related: Is there a way to EXPAND a group in Photoshop? https://gist.github.com/JimaDobes/371fcaf0d8f61fb5d1175d54e85209c7