There is a law. It’s called the Logan Act and prohibits these kind of actions. Jail time! The only time Legislators are protected is when they are on the floors of their respective chambers... and, maybe on the way to sessions... but that’s in dispute.
Its called Treason.
No one is above the law. Pelosi and Schumer have repeated it ad nauseum.
“Only two people have ever been indicted on charges of violating the Act,[3] one in 1802 and the other in 1852.[4] Neither was convicted of violating the Act.”
From Wikipedia..