You didn’t say whether it’s a button in the Node, in an Adornment on the Node, or in some HTML.
The basic idea would be:
// somehow get the Node, either:
// button.part, if it's a click event handler of a button in the Node, or
// button.part.adornedPart, if it's a click event handler of a button in an Adornment on the Node, or
// ??? only you know, if you have implemented an HTML button.
node = ...
node.diagram.commit(d => node.movable = !node.movable);