  We prove new boundary Harnack inequalities in Lipschitz domains for equations
with a right hand side. Our main result applies to non-divergence form
operators with bounded measurable coefficients and to divergence form operators
with continuous coefficients, whereas the right hand side is in $L^q$ with $q >
n$. Our approach is based on the scaling and comparison arguments of
\cite{DS20}, and we show that all our assumptions are sharp.
  As a consequence of our results, we deduce the $\mathcal{C}^{1,\alpha}$
regularity of the free boundary in the fully nonlinear obstacle problem and the
fully nonlinear thin obstacle problem.
