Viewport size and frame size discrepancy

In my game I have two text labels with two scripts, the first text label shows the players viewport size and the second shows the size of a frame I created which has a scale size of 1,1.

Screenshot 2023-09-19 201243
You can see that the frame Y size is 36 pixels smaller than the viewport size (I’m playing in fullscreen). I was hoping someone could explain why this is happening.

You can test it yourself here:

Script for the frame size

local Players = game:GetService("Players")
local player = Players.LocalPlayer

while true do
	wait()
	local AbsX = player.PlayerGui.FrameGui.Frame.AbsoluteSize.X
	local AbxY = player.PlayerGui.FrameGui.Frame.AbsoluteSize.Y
	script.Parent.Text =  AbsX .. " x " .. AbxY
end

Script for the viewport size

local Players = game:GetService("Players")
local player = Players.LocalPlayer

while true do
	wait()
	local ViewPortSize = workspace.Camera.ViewportSize
	script.Parent.Text = ViewPortSize.X .. " x " .. ViewPortSize.Y
end

The GUI size and position is shifted downward as to not overlap the topbar. Enable the ScreenGui’s IgnoreGuiInset property or fine-tune the ScreenInsets property to make the GUI satisfy the requirements you’re looking for. Both the viewport and GUI size should match if you’ve configured it to ignore all offsets of the player’s screen.