It is soap! What!
What happens is that vitamin D is produced on the surface of the skin, in the oil on the skin. It takes two days for this vitamin D to be absorbed! So if you wash with soap, after your sunning exercise, you wash the oil and vitamin D away. A shower with just water is ok...won't happen. What about washing with soap where the sun has not reached? That is fine. No loss of vitamin D.
Our aboriginal ancestors did not have soap. So this has only been a factor since civilization started! More disease induced by civilization.......