We consider light scattering by an anisotropic defect layer embedded into anisotropic photonic crystal in the spectral vicinity of an optical bound state in the continuum (BIC). Using a resonant state expansion method we derive an analytic solution for reflection and transmission amplitudes. The analytic solution is constructed via a perturbative approach with the BIC as the zeroth order approximation. The solution is found to describe the collapsing Fano feature in the spectral vicinity of the BIC. The findings are confirmed via comparison against direct numerical simulations with the Berreman transfer matrix method.