This. WD40 also attracts dirt like a mother fucker, same with non-synthetic motor oil.
See, my experience is that WD40 is a good long term protectant, and very, very short term lubricant. But if you’re not about to fire an open bolt weapon, or pack your rifle into a safe for two years, it’s utterly useless.