thank u so much, I appreciate ur help, I tried to use the args from the rotateChange function and then setting the angle in the diagram instance and it actually worked well
code snippet:
rotateChange={(args)=>{
if(args.state === 'Completed'){
diagramInstance.getObject(args.source.nodes.map(node=>(
node.rotateAngle = Math.round(args.newValue.rotateAngle/90)*90
)))
}}}