He's very much an advocate of selling if the situation warrants it.
He frequently sells stocks and doesn't need the money. He dumped his airline holdings (he owned 10% of all the majors) during the pandemic while sitting on ~$130 billion in cash. He sold a large chunk of Wells Fargo recently (a stock he has liked for a long time). He previously bought and sold Oracle, IBM, Walmart, and so on. He has made several mistakes messing with oil companies, including a bad one with ConocoPhillips in 2006 before the commodity bubble crash.
Buffett is always willing to sell, under two scenarios: 1) he comes to the conclusion that he was wrong in the assessment that prompted the purchase (a mistake on his part, as in Conoco); 2) something substantial changes about the the company or its context for the negative (or otherwise in a way that he isn't able to understand, something outside his lane).