In the immersed boundary method, the volume force that is applied to enforce the no-slip boundary condition is equivalent to a discontinuity in the stress tensor across the boundary. In the stress tensor discontinuity-based immersed boundary–lattice Boltzmann method, which was proposed in our previous study [Suzuki and Yoshino, “A stress tensor discontinuity-based immersed boundary–lattice Boltzmann method,” Comput. Fluids 172, 593–608 (2018)], the boundary is represented by Lagrangian points that are independent of the background grid, and the discontinuity in the stress tensor is calculated on these points from desired particle distribution functions that satisfy the no-slip boundary condition based on the bounce-back condition. Although this method allows computation of the force locally acting on the boundary, the local force has a spurious oscillation along the boundary. In the present study, we remedy this problem by relaxing the bounce-back condition. To confirm the improvement achieved by using the new method, we apply it to simulate typical benchmark problems involving two- and three-dimensional flows with stationary or moving boundaries. We find that the proposed approach can effectively eliminate the spurious oscillation of the local force, and the results obtained with the improved method show good agreement with other numerical and experimental results. In addition, as an application of the proposed method to local force calculation, we investigate the effect of lift enhancement due to wing–wake interaction on a two-dimensional butterfly-like flapping wing.