Trim not working

When using the trim option (edit nodes and T) on a line the line isn’t trimming to the nearest point but seem to extend from the at the opposite end. See pictures.
In the first image I’ve selected the line, and want to trim the top section to the line lower. I hovered over the top section and pressed T and the line extended as shown in the Botton photo.

Image 02-07-2024 at 14.50 2

Image 02-07-2024 at 14.50

Can’t figure out what I’m doing wrong and any help would be great.

Please share the .lbrn2 file you’re working with so we can take a closer look.