Layout cell collapse() method doesn't work when a grid is attached to the cell

I have a layout with 2 cells. A grid is attached to one of the cells. When i call collapse() method the cell doesn’t collapse. The only thing that changes is the resizable control.

Unfortunately I was not able to reproduce your described issue.
The following snippet seems to work well:
https://snippet.dhtmlx.com/88g3fwvc
If the problem still occurs for you could you please, provide a code snippet, complete demo or a demo link, where the problem can be reconstructed locally.