Rotating a wire cube gizmo?

I am making visual representations of the waypoint paths which are randomly generated points within a cube. I want the ability to rotate these pathing node areas and at the same time, have representations of these accurately.

    // Draw the node range
	var loc = Vector3(toleranceX, 1.0f, toleranceZ);
    loc = Quaternion.AngleAxis(transform.rotation.y, Vector3.up) * loc; // this line should rotate the box
    Gizmos.color = Color.yellow;
    Gizmos.DrawWireCube(transform.position, loc);

I tried rotating the vector about the Y axis to spin the node area but it doesn’t seem to work and only shortens the box. So either I am doing something wrong or wireCube gizmos do not support rotation.

Does anyone have any experience?

use Gizmos.matrix