Why is the transform gizmo not aligned correctly to my Python created object?
Apply the object scale. Rotating the mesh of the object scaled causes the object to squash.
bpy.ops.transform.resize(value=(dx_local, dy_local, 1), orient_matrix=view3d_rot_matrix.to_3x3())

#=== Appry object scale =====
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
#----------------------------

cut_box.data.transform(view3d_rot_matrix)
cut_box.data.update()