James has the foolproof method for this exact scenario.
But, Ben and Millard have IMHO the general method. (Well, OK, James' method is general too - switch the tool or use F&S with the marquee.)
It is an
archifundamental
(TM Duane Valencia or John Stebbins) to understand the space bar toggle of the magnet option of the select tool and another
archifundamental
to understand the arrow selection options of 'object must be fully contained in selection box' or 'partially contained'.
With the magnet suspended, and the fully-contained selection method ... the lines will select properly.
Karl
One of the forum moderators
AC 28 USA and earlier • macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB