How to rectify tannin staining through paint?
You may have wondered with all these low odor paints available why would anyone use a smelly paint?  One answer is to find a paint that will not absorb the stain.
You don't need to sand back to wood, just scuff sand to dull the sheen so that a fresh coat of different paint will stick.  however if there is a texture you want to disguise you can sand deeper.
Use a paint with a contrasting chemistry as undercoat, EG: use an oil-based paint with an organic solvent, or a shellac based sealer with an alcohol solvent if your main coat has a water solvent.