Symbolic integration gives wrong result. Is this a bug?

It seems the symbolic integration in Mathematica 14.3 has problems with complex path integrals. Look in the attached notebook to see the wrong computation.

FWIW, these symbolic complex-path forms are computed correctly:

Integrate[f[z], {z, 1 + 3 I, 1 + 5 I, -1 + 5 I, -1 + 3 I, 1 + 3 I}]
Integrate[f[z], {z, 4 I + 1, 4 I + I, 4 I - 1, 4 I - I, 4 I + 1}]