I found out that approach
BABYLON.VertexData.ExtractFromMesh(box).transform(box.getWorldMatrix());
is very destructive.
Practically, if you had box.checkCollisions = true
, then collisons will stop working and you will be able to walk through walls.
Instead, it should be done like following:
BABYLON.VertexData.ExtractFromMesh(box).clone().transform(box.getWorldMatrix());