I guess this is always true, if you adjust the statement appropriately.
Consider the Bott-ChernBott–Chern cohomology $H^*_{BC}(M):=\frac{\ker d\cap \ker d^c}{\mathop{im} dd^c}$$H^*_{BC}(M):=\dfrac{\ker d\cap \ker d^c}{\operatorname{im} dd^c}$. Since the curvature of a line bundle is a closed (1,1)$(1,1)$-form, its Chern class can be considered as an element of the Bott-ChernBott–Chern cohomology. There are natural maps from $H^{1,1}_{BC}$ to the Dolbeault cohomology and to de Rham cohomology; the de Rham image of the curvature is $c_1(L)$, and the Dolbeault image is the cohomology class of $\bar\partial \partial\log|f|$$\bar\partial \partial\log\lvert f\rvert$, which is equal to the Dolbeault representative of the Atiyah class.
This is also seen from the commutative square that Atiyah writes
$H^1(O^*_M) \to H^2(M,{\Bbb Z}) \\ \ \ \ \downarrow \hphantom{^1(O^*_M) \to H^2(}\downarrow\\ H^1(\Omega^1_M) \to H^2(M,{\Bbb C})$\$$\require{AMScd}\begin{CD} H^1(O^*_M) @>>> H^2(M,{\Bbb Z}) \\ @VVV @VVV \\ H^1(\Omega^1_M) @>>> H^2(M,{\Bbb C}) \end{CD}$$
which is valid in general situation, non-compact or non-KahlerKähler as well.