I fixed it in the end.
I was setting the attributes wrong. I was doing this props.attributes.X = 7;
which is wrong.
What I should have been doing is using the setAttributes
method props.setAttributes({ X: 7 });
If you use the set setAttributes
method then it’ll enable the save button.