For coherent sheaves, by using resolutions, one checks that the assertion in question is true: for any perfect complex $K$, one even has $D_X^2(K) \simeq K$. However, for larger quasicoherent sheaves $F$, the value $D_X^2(F)$ fails to even be a sheaf; I give an example below in Corollary 5.

Fix a countable set $I$, and a PID $A$ with at least two non-zero irreducible elements $p,q \in A$ such that $(p,q) = (1)$. We begin with the following basic observation that lies at the heart of the argument:

**Lemma 1:** One has $Hom_A(\prod_I A,A) \simeq \oplus_I A$ via the natural map in $D(A)$.

*Proof:* See Is it true that, as Z-modules, the polynomial ring and the power series ring over integers are dual to each other?.

This Lemma shows that $\prod_I A$ is not projective. More precisely, we get:

**Lemma 2:** The complex $K := RHom_A(\prod_I A,A)$ has non-zero $H^1$.

*Proof:* If $k$ is a residue field of $A$ at a maximal ideal (ex: $k = A/(p)$), then $k$ is $A$-perfect, so $- \otimes_A k$ commutes with all (homotopy) limits and colimits. This gives $K \otimes_A k \simeq Hom_k(\prod_I k, k)$, which is a vector space of uncountable dimension. On the other hand, by Lemma 1, if we assume that $H^1(K) = 0$, then we get $K \otimes_A k \simeq \oplus_I k$, which is a vector space of countable dimension; so we conclude $H^1(K) \neq 0$.

Now we globalize. Set $X = \mathbf{P}^1_k$ over some field $k$. All complexes below are considered as living in the derived category $D(O_X)$ of all $O_X$-modules on $X$, and similarly for functors. (I prefer this to using $D_{qc}(O_X)$ as the description of products in the latter is more subtle.) The global analogue of Lemma 2 is:

**Lemma 3:** The complex $K := RHom_X(\prod_I O_X,O_X)$ has a non-zero $H^1$.

*Proof:* This does not formally follow from Lemma 2 as $\prod_I O_X$ is not quasi-coherent. However, we can argue as follows: (a) first show that $H^0(K) := Hom_X(\prod_I O_X,O_X) \simeq \oplus_I O_X$ via the natural map, and (b) show that $K \otimes_{O_X} k \simeq Hom_k(\prod_I k,k)$ is a vector space of uncountable dimension, where $k$ is the residue field at $0$ viewed as an $O_X$-complex. Then (a) and (b) immediately imply the claim by the argument of Lemma 2. Moreover, (b) is clear since $k$ is perfect over $O_X$, so it remains to show (a). Consider the natural map $\eta:\oplus_I O_X \to Hom(\prod_I O_X,O_X)$. Clearly $\eta$ is injective. For surjectivity, fix some $f:\prod_I O_X \to O_X$. We want to show that $f$ has finite support, i.e., that $f$ factors through a projection to finitely many components of the product on the left. For any affine open $U \subset X$, the map $f(U)$ has finite support by Lemma 1. A glueing argument then finishes the proof.

Writing a product as the dual of a sum then gives:

**Lemma 4:** The complex $RHom_X(RHom_X(\oplus_I O_X,O_X),O_X)$ has non-zero cohomology in degree $0$ and $1$.

*Proof:* This follows formally from Lemma 3 as $RHom_X(-,O_X)$ carries coproducts to products.

Here is the promised example:

**Corollary 5:** On $X = \mathbf{P}^1_k$, if $D_X = RHom_X(-,\omega_X[1])$, then the functor $D_X^2$ carries the sheaf $\oplus_I O_X$ to a complex with non-zero $H^0$ and $H^1$.

*Proof:* As $\omega_X$ is invertible, one has $D_X = RHom_X(-,O_X) \otimes \omega_X[1]$, and hence $D_X^2 = RHom_X(RHom_X(-,O_X),O_X)$, so the claim follows form Lemma 4.