In this paper, we investigate the Anderson model on the Bethe lattice, focusing on the localized regime. Using the cavity approach, we derive compact expressions for the inverse participation ratios (IPRs) that are equivalent to those obtained using the supersymmetric formalism and naturally facilitate a highly efficient computational scheme. This method yields numerical results with unprecedented accuracy, even very close to the localization threshold. Our approach allows for high-precision validation of all theoretical predictions from the analytical solution, including the finite jump of the IPRs at the transition. Additionally, we reveal a singular behavior of the IPRs near the critical point that has not been previously reported in the literature. This singular behavior is further confirmed by the numerical solution of the nonlinear a model on the Bethe lattice, which provides an effective description of Anderson localization.