That's likely a firmware bug in the monitor. It probably reports some ridiculously small resolution during its boot process and macOS queries it that time and rearranges the windows accordingly.
macOS could implement workarounds of course, but probably it just follows the process whatever the display id protocol prescribes...