For instance, an investor that invested $2m and the one who invested $5k will not make same amount of profit.
That's not entirely true, because those two different investors may have different targets and mindsets.
You have to take into account what percentage of that person's wealth does the investment represent.
Someone who invested like 50% of his total money will be much more cautious and he can exit with smaller percentage earned.
With $2m 1000% increase (x10) will be enough for many people. Of course they can leave some money invested but they'll take most of their profit.
With $5k x10 increase may be not enough to start converting into fiat - so that person may hodl instead. If he hodls until x1000 he'll get $5m and from there he'll be close to outperforming $2m investor because next increases in value may put his profit above the wealthier investor's.
Little investors are also better suited for decline in the market as they're not risking their life savings.
Of course this is not directly related to the amount invested, it given example it may be completely other way round - $5k may represent all money that second investor have and he'll get out during x2 or x5.