Use sliders and have fun sliding the line up and down.
In Scratch, it doesn't allow you to have points to go outside the canvas, so instead of taking its actual x and y position, it takes the closest boundary x and y positions if that position is exceeding the boundary. This can result in lines glitching and deforming. This clipping engine takes the intersection point of the line with the boundaries, and draws from point to intersection, intersection to intersection, or point to point, depending on the case.