The issue is minor/cosmetic and there are no good solutions for syncing the window resize behavior to the actual frame rendering as the frames are rendered asynchronously.
When the resize call comes in, there are already one or several frames queued for presentation with the old resolution of the window. Discarding the frames or delaying resize operation to account for it would both result in worse user experience. By either making it feel sluggish to resize a window or alternatively, having the window black when resizing as the frames would be discarded.
In this case scaling of the graphics is the best compromise.