When setting Diagram.isReadOnly to true,How to allow Group expand or collapse?

Here is the example https://jsfiddle.net/dxxzst/vj23yuoz/4/
When I add “isReadOnly: true” to myDiagram, the expand/collapse button is invalid. Is there any solution?

Don’t set Diagram.isReadOnly to true, but instead turn off those permissions that you don’t want the user to be able to do.
https://gojs.net/latest/intro/permissions.html