I have to say, I was quite surprised by these replies. I figured that if condensation inside is caused by there being moisture inside the lens, and if WR is supposed to keep moisture out of the lens, WR looks relevant.
Also, people seem to suggest that WR (and the limitations of WR in keeping water out) were relevant in this case:
https://www.pentaxforums.com/forums/6-pentax-dslr-discussion/96738-pentax-k-7...densation.html
Also, as well as my K-S2, I also had my Q7 with me - at the same time, in the same conditions. The Q7 doesn't have a WR lens, yet it did not have condensation inside the lens.
Anyway, despite being discouraged by the comments above, I thought it was worth taking it back to the shop to see what they would say.
Given the comments above, I was expecting the worst. But I didn't even have to argue. Straight away, they wanted to know which lens I had got with the camera - was it WR. And as soon as I said it was, they just said, you shouldn't have moisture inside with a WR lens, so you shouldn't be getting condensation, so we'll send it back under the warranty.
Of course, I haven't heard what Pentax will say when they get the lens, but it is promising.
So for anyone who comes to this forum because they have a similar problem, I would suggest that it is worth taking the lens back to the shop to see if they will repair it under warranty.