found it, this error appears when the target you want to look at is exactly alligned with the "up" vector. eg:
var target=Vector3(0,10,0)
var tform=Transform.IDENTITY
print(tfrom.looking_at(target, Vector3(0,1,0))
this happens because The transform will first be rotated around the given up vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the target and up vectors.
but if the up vector is already perfectly alligned with the target, it cannot find the perpendicular axis for the second step.
Not a real error tbh