Hi,
yes, this is by design for euler angles, you should have both your object within the same reference, so that 89 degrees becomes the same rotation for both the source and the target.
else, you could use the signed angle or 360 angle actions from the ecosystem, which will give you either a -180 180 range or a 0 360 range.
Bye,
Jean