Geometry rotation/merge problem in three v125+

So I have a function which creates a cross with 3 geometries, each rotated by 90deg, it works fine in versions 124<, but in 125+ rotation not works, or merge doesn’t work, idk, whats wrong with my code?

const crossMesh = (cubeSize, material) => {
  const geometry = new THREE.BoxGeometry(...cubeSize);

  const cube = new THREE.Mesh(geometry, material);
  cube.rotateX(Math.PI / 2);
  const geometry1 = geometry;
  geometry1.merge(cube.geometry, cube.matrix);

  const cube2 = new THREE.Mesh(geometry1, material);
  cube2.rotateZ(Math.PI / 2);
  const geometry2 = geometry;
  geometry2.merge(cube2.geometry, cube2.matrix);

  const cube3 = new THREE.Mesh(geometry2, material);
  return cube3;

THREE.Geometry was removed in r125 and replaced with BufferGeometry. See THREE.Geometry will be removed from core with r125.

But I don’t use THREE.Geometry, code use THREE.BoxGeometry and it creates needed geometry but without rotation aplied to it.

THREE.BoxGeometry was based on THREE.Geometry before r125. Now it is based on BufferGeometry. If you look at the docs for BufferGeometry you’ll see that merge does not take a transform matrix as the second argument: