I know this is an old thread, but I just encountered the same problem. I had <h2>
and <p>
elements in the InfoWindow, and these both had bottom margins. I removed the margins, and InfoWindow sized correctly. None of the other suggested fixes worked. I suspect that the InfoWindow size calculation doesn't take the margins into account.