The opposite is true actually, when rates go up there is a sell-off in bonds which is exactly what is happening right now where bond prices are down 10%-20%
I don't understand why that would be. If the expected future cash flow of one asset increases (bonds), and remains the same for another (stocks) why would you allocate more money to stocks and away from bonds?
Your bond's price will drop to say 90% of the notional amount while the new bond will trade at 100% so they will effectively have the same "yield" of 3%.
You're right though IMO, but people should be careful about trading on that knowledge until they're up to speed on how bond trading works
Bond prices are down, this means yields grow, and thus become more attractive investments than high P/E stocks.
I think the reason this sounds unintuitive is because the bond market isn't exactly a "free market" in the general sense. The Fed is manipulating the money market to set bond yields, so from a causative point of view, the yields rise first, which cause a drop in bond prices, which make buying bonds attractive for investors, who then, as a result, shift assets from stocks to bonds.
(disclaimer: just speaking from knowledge gleaned from, among all things, youtube videos :D definitely not an economist !)