Nothing a little Loctite 3609 won't fix.
This is a one-part thixotropic epoxy that is designed for bonding SMT components prior to wave soldering. Unlike most of the UV glues I use during rework (when no subsequent reflow thermal cycles are expected), 3609 is tolerant to soldering temperatures without any ill effects.
I love the stuff, my only complaint is that it's got a comparatively short shelf life and has to be stored refrigerated. This is pretty standard for one-part epoxies though, as they self-cure even at ambient temperatures following the Arrhenius curve.
You can in principle apply it along with solder paste and cure during the reflow cycle, but I prefer to do a second oven pass so that components have a chance to self-align and relieve stresses before being permanently fixed in place (it will cure prior to the paste melting in this regime). With accurate machine placement this might be a non-issue, but tweezer placement definitely benefits from self alignment.