Sorry, I haven't been monitoring this thread.
I still am having the problem. It went away for awhile and then I noted that it was very warm and humid when it came back. I don't really know if that is a pattern yet and it is unlikely that we'll have that weather again soon up here in Wisconsin.
When the window does not latch, the car does not lock. If you lock the vehicle while pressing in on the window, then the doors will lock, but the window is, of course, still unlatched. And yes, the problem seems to go away after it sits for a while (few hours? Overnight?).
My check engine light is on for a minor problem, and when I get around to taking the car in to get that fixed, I'll have them look closer at the latch as well. It's an unfortunate problem living 90 miles from the dealership. My wife thinks WD-40 solves everything and she wants to try that, but I'm resisting until the dealer can look at it.
I'll post again once it appears to be fixed.