I also ran into this and after some searching found there was a plugin project setting that solves this without any custom code required: Plugins → Movie Pipeline in Editor → Resize PIEWindow to Output Resolution.
I found even with -ForceRes set as the tooltip suggests I needed a monitor with a resolution at least equal to what I was rendering, with my 4k monitor rendering a movie at 4k I needed to disable DPI scaling and hide the windows taskbar before I clicked render or it couldn’t make the PIE Window big enough and the issue still occured.