The TREENODE that is used in the workplace function tree is using style variant WP_FUNCTIONTREE - so here you can pre-set all the CC-attributes.
We 200% recommend to use the style tool which is part of CaptainCasa toolset. Here you open the last tab "Control Variants", select "t:treenode" and...
1. set "extension from parent style"
2. set the attributes FIXSTATUSIMAGEENDNODE/OPENED/CLOSED to update the images
If you are new to the style management, please take a short look into the Developer's Guide in order to get the baiscs.