Sure. But the issue is when they have insider information on how a vote is going to go, when the vote impacts stock prices. She has material information that the public does not.
The common belief is that insider trading laws are about having data that the market doesn't know. In the US that's just not the basis for the law. In the US there is no expectation that everyone has the same information when trading. The expectation is that people who have a duty to the shareholders are not trading on any non public material information. If you don't have a duty to the shareholders, it doesn't matter how you trade.
Is that the appropriate standard to hold congress people to? I don't know, personally i think, no. But its not obvious that its incorrect from a legal point of view. What fiduciary duty does Nancy Pelosi have to some fund her husband owns? I'm good with a definition that says "once you become a congress person you have fiduciary duty to everyone" but thats not the law now.
So if I’m a billionaire, I can say I’m going to buy a company, to build up its stock price, and then short it and publicly walk away? That’s fine because I don’t have a duty to that company’s shareholders? I mean sure, can only do it once, but that’s legal?