yEd's layout algorithms produce "good" results but cannot guarantee perfect results. In your case, the layout algorithm needs to solve a "crossing minimization" problem. Unfortunately, in the general case "crossing minimization" is a very, very difficult problem to solve, i.e. the algorithm would often have to run for a very, very long time if it was required to always find the optimal solution. To prevent that very, very long runtime, the algorithm uses a heuristic that produces good but possibly non-optimal results - as in your case.
I suggest manually moving group (1) to position (2), enabling "Use Drawing as Sketch", and running the algorithm a second time.