Switching RJ45 with relays
To expand on the comments, which are pretty much the answer:

The cable has a specific characteristic impedance. This impedance is created by the capacitance between wires and the inductance along them. It is in effect caused by the number of twists, the tightness of the twists, the insulator properties, etc.

Taking apart one pair for 10 to 15mm for the purpose of crimping it into a connector, which is then also designed to give the best possible conductor-to-conductor distance, is pretty much okay, no major changes there.

It is a very different thing to tear apart a wire and put an entire relay into it. You are changing the capacitances and inductances in the cable so much that the impedance changes at the point where you where you put the relay.

This change in characteristic impedance works like a mirror to part or all of the high frequency signal, where some or all of it gets reflected back to the sender. This confuses the sender (or even damages it, but modern network gear is pretty damn well protected, so it'll be unlikely), causing it to cancel the package it is sending, because it thinks it is seeing "collisions" with other data.

So every packet sent on either side comes back from the point of your relay and causes a collision detection and abort.

It is why so many HF designers are so very well paid. It's a very complicated job to make every PCB trace, every connector and every wire so that a 100MHz to 10GHz signal gets through okay. And your relay most certainly was not designed by a HF engineer.