**Yes, your counterexample seems to be correct — there’s an error in Def C2.2.1 as printed.** This issue is mentioned in the n-lab’s article on dense sub-site (current revision permalink), which notes a very similar counterexample, and refers to a longer nForum thread on the topic (mostly by Dexter Chua, Thomas Holder, and Mike Shulman).

An easy and clean fix is to restrict to *full* subcategories, as Zhen Lin suggests in comments. But Johnstone clearly intends to cover the non-full case; straight after Def C2.2.1 he remarks:

In practice, the Comparison Lemma is most often used for full subcategories, and many texts only define denseness in this case; however, the extra generality afforded by the definition we have given is occasionally useful — we shall see an instance of its use in 5.2.5 below.

The n-lab article offers another fix, modifying condition (ii) to say “for each $f : U \to V$ with $V \in \mathcal{D}$, there is some covering sieve on $U$ whose elements $g : W \to U$ all satisfy $fg \in \mathcal{D}$”. But this condition seems much too strong: it will almost never hold (as noted by Dexter Chua in the nForum thread), even in the full case. In particular, if I’m not mistaken, it won’t generally hold in the application in Johnston’s Lemma C5.2.5, showing that any étendue (aka locally localic topos, i.e. a topos for which some well-supported slice is localic) has a site of definition with all maps monic.

So **the printed version is in error; but neither the restriction to full subcategories, nor the n-lab’s fix, seems to correspond to Johnstone’s intention, or suffice for his application in Lemma C5.2.5.** ~~It would be very nice to find a better fix, strong enough to imply the Comparison Lemma C2.2.3 but general enough for the application in Lemma C5.2.5!~~ Edit: Simon Henry’s answer presents what looks like the right fix, from the original Kock–Moerdijk paper that Johnson’s C5.2.5 is based on.

notsatisfied ? For f the identity of the single object, you need a covering sieve (i.e. all of G) such that the composite is always in D (i.e. trivial) $\endgroup$generatea covering sieve. In this case, there’s only one such morphism, but it’s an isomorphism, so it generates the maximal sieve. I agree with OP, this seems like a counterexample to the lemma as printed, and I would guess the error is exactly in the details of condition (ii). $\endgroup$2more comments