How can I prevent the Y local axis from changing direction while using lookRotation?

I’m kind of new to this.
it’s a 2d scenario, I’m using “lookRotation” to make the local Z axis look at the sphere.
The sphere and the axis are in the same Z position, however when the sphere passes over the axis the direction of the local Y axis changes its direction to the opposite side immediately.
How can I make the local Y axis keep its original direction?
this is my code:

Vector3 direction = lookAt.transform.position - this.gameObject.transform.position;

        this.gameObject.transform.rotation = Quaternion.LookRotation(direction);

LookRotation receives a second optional parameter ‘worldUp’.

try feeding it the current up and it should respect it.
Btw there is also Transform.LookAt, which could save you from typing out the first line for ‘direction’, as its a common use case. also has the optional worldUp parameter.