The results of one study could be an anomaly, which is why replication is important in science. But when those results get replicated in tens or hundreds of such studies, we can start trusting those findings (although when surrogate markers are involved, their interpretation can be up for debate).
Also when people say "high quality", it's important to understand what it refers to. It means the authors can show that the study was designed for the declared primary outcomes. It means that adherence was ensured, versus an observational study relying on questionnaires. And it means a control group was used for comparison, which was randomized, thus the study preferably showing a dose dependent response.
Having a control group BTW minimizes the impact of the subjects not adhering to the program in the way that you describe, since you'd have rebels in both camps.
https://bcmj.org/news/vitamin-d-effective-reducing-flu-and-c...
Harvard Gazette: Study confirms vitamin D protects against colds and flu
https://news.harvard.edu/gazette/story/2017/02/study-confirm...
WebMD: Vitamin D May Cut Risk of Flu
https://www.webmd.com/cold-and-flu/news/20100616/vitamin-d-m...
Vitamin D protects against colds and flu, finds major global study https://www.sciencedaily.com/releases/2017/02/170216110002.h...
I have a personal interest in Amyotrophic Lateral Sclerosis, so I am reading patients' Internet forums since two years.
Several patients report participating in trials but they also tell that they take other drugs without telling doctors (they do not want to be expelled from the trial). Those drugs could be whatever they fancy, and they change often: A week seems too long for them, if there is no improvement.
I expect the situation being the same in every life challenging condition, so I doubt that RCTs are of high quality.
Moreover even the pharmaceutical industry seems to be not sure: Sometimes they are repetitively testing the same drug (for example Memantine in ALS):
https://clinicaltrials.gov/ct2/results?term=Memantine&cond=A...