Let $k$ be a field. Then Thm 15.3.3.1 of Lurie's SAG says that Koszul duality, regarded as a contravariant endofunctor $\bar D$ of augmented $E_n$-algebras over $k$, is a deformation theory in the sense of loc. cit., 12.3.1.1, 12.3.3.2 (with respect to the deformation context $\{k\}$ in the sense of loc. cit., 12.1.1.1.). Recall that the main upshot of this is that it means that $\bar D$ induces an equivalence of categories on certain "nilpotent" or "Artinian" objects (Thm 12.3.3.5 of loc. cit.).
Suppose now that $k$ is a commutative ring or an $E_\infty$ ring spectrum or simplicial commutative ring. Then it seems unlikely that the Koszul duality functor $\bar D: (Alg^{(n),aug}_k)^{op} \to Alg^{(n),aug}_k$ is still a deformation context, because it involves taking the dual of a $k$-module. However, we can remove this part of the construction and just consider the "pre-Koszul duality functor" $D: (Alg^{(n),aug}_k)^{op} \to (CoAlg^{(n),aug}_k)^{op}$.
Question: Under what conditions is $D$ a deformation theory in Lurie's sense?
At least -- are there cases where $k$ is not a field and $D$ is a deformation theory?
I haven't specified the deformation context. The answer might depend on the choice thereof. E.g. $\{k\}$ might be interesting, or some set of invertible objects or some set of dualizable objects, or...