Dynare has a stock at the end of period timing convention, while you used a stock at the beginning of period convention for capital. The predetermined_variables command tells Dynare about this difference in timing.
Regarding replication results, the standard answer is