Currently using 2023.2.
The provided components work fine when not part of any canvas, but when put on a canvas, the gizmos will show the correct end points but the line is not drawn.

It is worth noting, what considered "center" of the object (the transform handle) is not even on the magenta gizmos line.
I ain't prodigy in shaders but... could there be a way to make this work on canvases?