I like to spray water displacing lube into the barrel while it is still wet with water and then blow the barrel dry.
I discovered when honing car engine cylinders, after washing them clean with soap and water, there is always a small amount of flash rusting that occurs when the water dries, but, if you spray the water displacement lube on the cylinders while they are still wet, no flash rusting occurs.
That's why I do the same with my guns. After the WD-40, I apply a more substantial rust preventative for long term storage, RIG for example. ATF is said to be good also.