It makes sense that if certain foods are eliciting an exagerated response from the immune system (for whatever reasons, including due to vaccines) and if removing those foods calms down whatever parts of the immune system were over-responding, this could impact the brain and behavior in the ways you have touched on in this article.