"Accounting for" using e.g. regression techniques is complex guesswork and leaves room for residual confounding. (Just try to imagine how exactly you'd do it in this case!)
There is no perfect solution, but simply excluding problematic data is often the least confounding option.