Hmmm, odd on mine it is. Same browser/OS. It's probably related to screen.height vs screen.availHeight. But why the difference? Mine leaves a bottom gap if using availHeight.
The difference might be in the camera notch. Neither screen.height nor screen.availHeight gives the real fullscreen size on both kinds of Mac. Other things can also throw it off, like browser zoom or a display set to a “scaled” resolution.
The fix: measure the viewport instead : window.innerWidth, window.innerHeight