Offset problem from pick and place example when using UR5e + 2f-150 end-effector


I made a pick and place example with UR5e + 2f-140 gripper.
However, it has offset problem when it pick a cube. I think having the only z-offset is enough at end_effector_offsetbut, it has some proportional value on planar xy with the position of the cube.

How can I fix this problem?
I attach my code below.

ur5e_pick_place.7z (2.7 MB)