This interpretation may be incorrect, but my reading is that treason is one of the very few cases that allows the Executive Branch to take a Congressman into custody in the course of carrying out his duties, but the speech or debate clause is a separate provision.
IOW if I am a Congressperson and and (say) sell secrets to Iran, and the attorney-general obtains sufficient evidence to bring charges (testimony of two people etc.), I can be arrested while traveling to/from, or even while working in, the Capitol. But if I stand up during a debate and reveal information that would be useful to Iran without having had any actual traffic with the Iranian government or a representative, that's quite different.
IOW if I am a Congressperson and and (say) sell secrets to Iran, and the attorney-general obtains sufficient evidence to bring charges (testimony of two people etc.), I can be arrested while traveling to/from, or even while working in, the Capitol. But if I stand up during a debate and reveal information that would be useful to Iran without having had any actual traffic with the Iranian government or a representative, that's quite different.