We investigate the performance of a simple Bayesian fitting approach to correct the cosmic microwave background (CMB) B-mode polarization for gravitational lensing effects in the recovered probability distribution of the tensor-to-scalar ratio. We perform a two-dimensional power spectrum fit of the amplitude of the primordial B-modes (tensor-to-scalar ratio, $r$) and the amplitude of the lensing B-modes (parameter $A_{lens}$), jointly with the estimation of the astrophysical foregrounds including both synchrotron and thermal dust emissions. Using this Bayesian framework, we forecast the ability of the proposed CMB space mission LiteBIRD to constrain $r$ in the presence of realistic lensing and foreground contributions. We compute the joint posterior distribution of $r$ and $A_{lens}$, which we improve by adopting a prior on $A_{lens}$ taken from the South Pole Telescope (SPT) measurement. As it applies to the power spectrum, this approach cannot mitigate the uncertainty on $r$ that is due to E-mode cosmic variance transferred to B-modes by lensing, unlike standard delensing techniques that are performed on maps. However, the method allows to correct for the bias on $r$ induced by lensing, at the expense of a larger uncertainty due to the increased volume of the parameter space. We quantify, for different values of the tensor-to-scalar ratio, the trade-off between bias correction and increase of uncertainty on $r$. For LiteBIRD simulations, which include foregrounds and lensing contamination, we find that correcting the foreground-cleaned CMB B-mode power spectrum for the lensing bias, not the lensing cosmic variance, still guarantees a $3sigma$ detection of $r=5times 10^{-3}$. The significance of the detection is increased to $6sigma$ when the current SPT prior on $A_{lens}$ is adopted.