The legislation described does not prevent boycotts, except by government contractors who have a duty to government policy and thus do not necessarily enjoy those protections (https://www.congress.gov/crs-product/R47986):
> Speech restrictions imposed by private entities, and government limits on its own speech, usually do not implicate the First Amendment.
As for public investment funds: you'll need to explain to me how saying that X may not invest in Y because Y is refusing to buy things from Z, causes Y to stop being able to refuse to buy things from Z (i.e., compels Y to buy things from Z).
If you want to not buy things from Israel, then... just don't. You don't need my money, or a private investment firm's, in order to achieve that.