Fitting rods into a wooden truss (cut off edges)
The Shear tool won't work the way you want because your object is oblique. The Shear tool moves the selected vertices on one of the 3 axis, it doesn't slide the vertices along the existing edges, therefore the object you want to shear needs to be parallel to one of these axis if you don't want it to be deformed, and it is not the case here. Examples with shear on the Y axis:


In your case the solution is to use the Knife tool (K to activate, Z to cut through, C to cut perpendicullary).
That said, we don't know if you want to merge your bar with the other ones, in that case you'd better use the Bridge tool to join 2 faces of the horizontal bars.