The point is that the $\omega$ in an $\omega$-model satisfies full induction, even if the whole model does not.

Take a nonstandard $\omega$-model $M\models\rm \Pi_n\text{-}collection+V\,{=}\,L$.  Let $I$ be that given by Corollary 4.5.  Suppose $\varphi(v,x)$ is a $\Pi_n$-formula for which 
$$A=\{x\in\mathrm L_I^M:\mathrm L_I^M\models\exists v\ \varphi(v,x)\}$$
is nonempty but has no $\in^M$-minimal element.  By recursion, we will define an $\in^M$-decreasing $\omega$-sequence $(a_i)_{i\in\omega}$ of elements of $A$ such that $\{a_i:i\in\omega\}$ is $\Delta_{n+1}$-definable in $M$.  This gives what we want because it contradicts $\Delta_{n+1}$-foundation and hence $\Pi_n$-collection in $M$.

Start with any $a_0\in A$.  Suppose we already have $a_i\in A$, where $i\in\omega$.  By our hypothesis, we know $A$ contains some $\hat a_{i+1}\in^M a_i$.  Find $\hat v_{i+1}\in\mathrm L_I^M$ such that $M\models\varphi(\hat v_{i+1},\hat a_{i+1})$.  Given any big enough $\mathrm L_\alpha^M\subseteq\mathrm L_I^M$ containing both $a_i$ and $\hat v_{i+1}$, define
$$
 \begin{aligned}
  v_{i+1}&=\min\{
    v\in\mathrm L_\alpha^M:
    M\models\exists x\in a_i\ \varphi(v,x)
   \},\ \text{and}\\
  a_{i+1}&=\min\{
    x\in a_i:M\models\varphi(v_{i+1},x)
   \},
 \end{aligned}
$$ where the minima are taken with respect to the $\mathrm L^M$-order.
These exist because $M$ has $\Delta_{n+1}$-foundation.  It can be verified that this choice of $a_{i+1}$ does not depend on the choice of $\alpha$.

Since $\omega^M=\omega$, one sees that $i\mapsto a_i$ is a total function $\omega^M\to M$.  The rest is straightforward.