It is always a (quasi-)isomorphism.

In fact, because you are deriving the tensor product you do not need to assume $B$ is flat, and you do not need any assumptions on $A,B,f$, or even to assume that $B$ is a ring.

The general statement is that if $M,N$ are complexes over $A$, then $(M\otimes^L_A N)^\wedge_p\to (M^\wedge_p\otimes^L_A N)^\wedge_p$ is a quasi-isomorphism.

I'll write a proof below, and remove the $L$'s from the tensor product, but I still mean derived.

*Lemma*: A map $f:M\to N$ induces a quasi-isomorphim $M^\wedge_p\to N^\wedge_p$ is and only if it induces a quasi-isomorphism $M/p\to N/p$, where $-/p$ means derived cokernel.

*Proof*: One direction follows from the fact that $M\to M^\wedge_p$ induces a quasi-isomorphism after $-/p$.

For the other direction, by induction and using the natural cofiber sequence $M/p\to M/p^n\to M/p^{n-1}$, one sees that $M/p^n\to N/p^n$ is a quasi-isomorphism, and therefore so is $M^\wedge_p=\lim_n M/p^n\to \lim_n N/p^n=N^\wedge_p$ , where $\lim_n$ is implicitly derived.

Now the general statement follows immediately: you need to prove that $(M\otimes_A N)/p\to (M^\wedge_p\otimes_A N)/p$ is an quasi-iso, but the exactness of $\otimes_A$ implies that $(D\otimes_A N)/p = D/p\otimes_A N$.