Available in LabVIEW 2019 and later. Go to VI Properties > Window Run-Time Position, change the Position value to 'Custom' or 'Centered', uncheck 'Use Current Panel Size', specify the panel size you want, and check 'Scroll panes to origin at run time'. After making these property changes, a gray rectangle will appear on the front panel showing the area that will be displayed at run-time.
Resizing the front panel so it is correct when running the VI is still very tedious and can easily mess up during editing. The problem is even more severe for Xcontrols, because their runtime size is often very small so there is not even enough room to e.g. display all the tools in the tool bar during editing. Once the runtime size is correctly set, all it needs is a double-click on a terminal that has its FP item hidden outside the visible area and everything on the FP shifts and messes up.
We need three things:
An "edit time" FP size that is "comfortably big" so we can see the entire toolbar and possibly also helper controls and even maybe some comment text intended for the programmer that are outside the operator area and only used for debugging and such.
A "run time" FP size that matches exactly what the operator sees during running.
A special decoration or other visual cue during editing that indicates the FP area that will be visible at runtime.
We already have the crosshair in the upper left corner when showing the grid, so that could be defined as the upper left corner at runtime by default. All we need is define the upper left and lower right corner and the runtime FP area is uniquely defined. As a visual cue, everything outside the runtime area could be a shade darker or tinted differently than normal to indicate that fact. Running the VI would snap the FP boundaries to the bright area.
Then we also need handles to move any of the boundaries at single pixel increments. A control that scales with the front panel would simply scale to the bright area instead. Of course a legacy mode for older VIs that did not have this feature during their creation needs also to be supported.
The example image shows a reddish transparent area (just to throw out another idea, maybe a slightly darker grey would be better). This is one of my own subVIs that demonstrates the problem at hand. At runtime, only the progress bar should be visible, while at edit time, I want to see all controls, because I might need them e.g. to wire the connectors. It is not easy to switch between the two sizes.
(Of course we can currently program around all that by setting windows parameters via property nodes, but it is ugly, inefficient, and tedious.)