Sometimes all it takes is to take the wheel off and mount it again. This often will fix the rubbing problem. If not, I would try to remount the caliper. Flex could cause the rotor to rub, but it sounds like you get it fixed to your liking for one ride and then after you take the wheel off and replace it later you get the rub back. If this is truly the case I would say that flex is not the only reason and setup is a major player.