All GoJS GraphObject or Diagram properties that return a Point, Size, Rect, Margin, or Spot return immutable objects – the programmer should not try to modify their values, such as by setting their Rect.x property. When using go-debug.js that prohibition is enforced and you get that error. When using go.js you might not get that error and who knows what might go wrong – the behavior is undefined.
I’m sorry but I don’t know what is happening or what might be causing that error. Precisely which version are you using? Evaluate go.version.