This is a great talking point and @slymeat has some excellent points.
Our fearless leader here at Strawman, Andrew Page, can probably add quite a bit to this topic and same with Claude Walker with respect to their commentary on Pro Medicus. Both adore the company, both are long term holders, both believe in the investment thesis to this day, but they also see the stock as having run too high (my words, not theirs, I don't want to misrepresent them). The question then becomes, what on earth do you do?
Many fund managers will encourage you to "dollar cost average" into stocks or ETFs over time. I think a similar methodology can be implemented when you have one of your best investments run like PME has done but from a selling perspective. You slowly and gradually over time sell the stock to take some profits. That way, if the stock continues to go up, you still benefit (and can reassess if you should be selling), and if it goes down, you can comfort yourself in that you took some profits. And if you were fortunate enough to exit at the right time and you want to buy back in because you still fundamentally believe in the long-term prospects of the company, then you can buy shares again. Exiting a stock should not necessarily be like leaving a job in the sense that most people would not go back to their previous place of employment ("leave it in the past" as it were).
I also echo the sentiments about when to buy. The reason I raise PME above is because I loved this company but everytime I looked at it I thought it was overpriced. When the Covid Crunch hit in March last year, the stock dropped to $19ish dollars. It quickly rebounded (like a lot of stocks) and in April it was hovering around the $26 mark. I sat there for days pondering whether I should buy it. However, mentally, I was so anchored to the price I saw in March that I couldn't pull the trigger at $26 or even $24ish on daily fluctations. I did not buy the stock and we know what PME has gone on to do since. As Claude says, "you can't pat all the fluffy dogs" and as @slymeat says, don't squabble over getting the best price.
For what its worth, I chose to deploy funds I had set aside to allocate to PME to CSL as it was a sizeable amount of money and hence I wanted a stock that was going to be relatively solid (with a bit of risk). That has been an OK investment, but not great. In short, I wish I had the problem of having to exit a great position in a heated stock like PME!
Cheers