The argument is that if there are constant returns to scale then the marginal product of each factor of production is constant as total quantity changes. This makes the production function homogeneous in the first degree and it will look something like
$$Q=\dfrac{\partial Q}{\partial A}A +\dfrac{\partial Q}{\partial B}B +\dfrac{\partial Q}{\partial C}C$$
Then if each factor of production is paid at a rate equal to its marginal product, the complete value of the production will be distributed to the factors of production, since
$$PQ-\left(P\dfrac{\partial Q}{\partial A}A +P\dfrac{\partial Q}{\partial B}B +P\dfrac{\partial Q}{\partial C}C\right)=0$$
so there will be no economic rent or profit
The practical problem with this is that constant returns to scale is a very strong assumption. The theoretical problem (at least for marginalist theories) is that there is no natural equilibrium for the level of production