You don’t have to buy or sell an entire investment position at once. It never feels good to have no cash available if something you like gets cheaper.
Saving money into different “buckets”, such as pre-tax retirement accounts, Roth, and taxable accounts provides a lot of flexibility both in the short-term and long-term.
If you have a sizable emergency fund, cash, you will be able to navigate stock market volatility typically better than not having any short-term reserves available.
Don’t let tax consequences be a primary driver to any portfolio management decision. Nobody ever got hurt taking a profit, as the saying goes….