After observing this I don't really mind hiring people to work for 2-3 years and then have them move on to another role, and most people I hire I do so with the expectation that I'll get a good two years of work and not much more.
A very small percentage of people continue to improve over the long term, and those people I am happy to continue increasing their pay, but I don't really go out of my way to retain employees and I don't think it's particularly worth it to do so.
This blog post mentions a kind of impact based compensation structure, and while I can respect the idea behind it, I am skeptical that they've managed to find a deterministic and impartial way of measuring "impact". I don't presume to have such a system so I pay based on what I observe in the market and let the market decide what the value is of software developers. For example, I genuinely don't know if software developers have more of an impact than the product designers, or the legal department even though I pay software developers much much more. What I do know is that it's much easier for me to hire a competent lawyer or UX designer than it is to hire a competent software developer and there are many more competent lawyers and designers out there... so I pay them less, regardless of whatever objective measure of impact may exist.