Hello. When you're using the default built-in vga font as you are, the render surface needs to be created in multiples of 8 pixels across and 16 pixels down, which is the size of the individual character. When you maximize the window, it will stretch to fit your desktop, regardless, so you get the extra unrendered black void at the top. Your program is still getting mouse coordinates accordingly but it won't really match what you see when it's like this.
My advice is not to maximize the IDE window, but to enlarge it manually, by dragging from the corners until it uses up your whole desktop. Since it will remember that size and position next time you run QB64, it should solve it for you.