Update: Please read this comment by Benjie. It looks like these values are reporting the viewport width and height at the time of tab creation.
document, until I tried
screen and found the following differences:
screen.availWidth = 768 screen.availHeight = 1004
screen.availWidth = 748 screen.availHeight = 1024
As you can see, everything is the same except
Here is the test site that I used. It would be great if you could verify this by linking your screenshots in the comments.