You can take $\kappa(n) = n/2$ if $G$ is not virtually nilpotent of class $\le 2$.
Let $B_n = S^{\le n}$ and $C_n = \{[b_1, b_2] : b_1, b_2 \in B_n\}$. Suppose $|C_n| < n/2$. By pigeonhole there is some $m < n$ such that $C_m = C_{m+2}$. For $[b_1, b_2] \in C_m$ and $s \in S$ we have $[b_1,b_2]^s = [b_1^s, b_2^s] \in C_{m+2} = C_m$, so $C_m$ is a union of conjugacy classes. Since $G'$ is generated by the conjugates of $C_1 \subseteq C_m$, it follows that $G'$ is generated by $C_m$. The conjugation action of $G$ on $C_m$ has finite-index kernel $K = C_G(G')$, and $[K, G'] = 1$. In particular $K$ is nilpotent of class $\le 2$.
If $G$ is nilpotent of class $2$ and not virtually abelian then there is some commutator $[s_1, s_2]$ of infinite order, and $[s_1, s_2]^n = [s_1, s_2^n]$, so we can take $\kappa(n) = n$.
If $G$ has class-2 subgroup of index $k$ then by using Schreier generators you can argue similarly that $\kappa(n) = n/3k$ works.