That's a rather complex discussion.
The QL uses a 'fake progressive' timing close to the PAL spec with some liberties which never the less work fine on PAL compatible TVs and monitors.
This format has 640 pixels per line, and 312 lines, which includes all invisible portions of the scan.
Each line takes 64us to display and out of this, the standard guarantees 48us of video to be visible on the screen. However, the QL uses 51.1us, so in theory, only 480 out of 512 total pixels in mode 4 will be visible on a CRT TV. Since CRTs are not exactly rectangular and had some distortion at the edges, the visible 480 pixels were always kept a slight distance from the corners and edges, so depending on the TV, some of the 32 'extra' pixels in each line were still visible on TVs.
Not all of the lines are visible either. Out of the 312, about 288 are visible from absolute top to bottom of the screen. Again, the typical CRT was not rectangular (unless it was a Trinitron...) so several lines could be clipped by the rounded top and bottom edge. So, the screen was too wide to display on a 4:3 CRT but also did not use the entire height of the 4:3 CRT. However, TVs in general were set up to that the well reproduced area of the screen was about 480 x 240 in QL pixels, which is still 2:1, though since about the same border was put on the CRT in centimeters on all sides, and the screen is wider than it is tall, the same number of cm of border is less of a percentage in the horizontal direction. Because of this the TV picture shows very slightly squashed circles - usually the difference is imperceptible, since a regular TV screen geometry is not that precise to begin with.
On QL specific monitors, the picture was made narrower so that all 512 pixels fitted the screen and also all visible lines. So, on modern LCD monitors, the best fit will be double wide and triple high pixels on a 1024x768 LCD panel, and like all LCDs no border.
1280x1024 LCD panels have square pixels and a 5:4 aspect ratio. This was originally a 'workstation' resolution and was intended to be displayed with square pixels, which was done in two ways, depending on the workstation monitor OEM execution of the standard - one was a real 5:4 aspect ratio screen, and the other was a regular 4:3 screen with unused borders on the side. The fun part of this story is that both actually used the same 4:3 screen and unused border, just in the first case the plastic surrounding the screen was extended to cover the unused portion to the left and right, and the whole design of the front was adjusted so it was not perceptible and looked like a 5:4 aspect ratio CRT
At one point I had a SUN and Tektronix 19" trinitron monitor side by side and noticed the picture was exactly the same size, just the SUN had a narrower case, and guessed (correctly) that it would have been FAR too expensive to produce two completely different CRTs (even with the prices charged for these monitors back then!). I just about laughed my head off when I opened the monitors and found the exact same thing just with a different plastic case, covering the unused portion of the screen front in case of the SUN monitor, and the left and right edges of the glass tube being closer to the insides of the plastic case.
Upgrade your SUN workstation monitor to 1366x1024 by cutting plastic
(Well... I know Apple II users who upgraded their floppy drives from 36 tracks to 40 using a file to file off the head end stop, so perhaps there is precedent)
Unfortunately, 5:4 LCD screens that have an 'maintain aspect ratio' option were very rare, most simply stretch the picture to full screen, resulting in a vertically elongated picture. The aspect ratio option was only popular for a short time when 16:9 or 16:10 aspect ratio LCDs became available as their native resolutions were not commonly supported back then, but today it's stretch, no matter which way, to fill the screen. And you are lucky if it even recognizes any of the lower VESA modes properly except 720x400 text to get to a PC BIOS screen :/