However, this is a package method so it's not intended for you to call it directly. If you do call it, you may want to also call
Blockly.getMainWorkspace().render() afterward so you don't see empty space where the blocks would reside. Note that a user could get these blocks in the statement input back by collapsing and expanding the block so you may want to remove this option from the context menu, or alternatively use a combination of
setMovable and
setEditable to make it so that these blocks can't be moved or changed if the user decides to show them.