The INVISIBLE flag for WMB entities makes them invisible, they are not rendered. Otherwise check your script, you set a wrong flag.

But, the Invisible texture flag for a block texture behaves different, the block is still rendered, only the invisible surfaces are not rendered.