Debug.DrawRay is not in a straight line

I’m using the below code in an attempt to draw a ray in a straight line

        Vector3 aimDir = transform.TransformDirection(Vector3.forward) * 100;
        Debug.DrawRay(transform.position, aimDir, Color.green);

However, as seen in the below screenshot it is actually going up at an angle for some reason. I’ve tried using transform.forward as well but same result. What could be happening?

I have just tested this code and works fine

Debug.DrawRay(transform.position, transform.forward * 100, Color.green);