Spotted this issue when using the ‘focuspoint’ module, doesn’t seem to happen with just the usual form fields - only when fields are added (see screenshot).
Note that this can only be partially observed post 3.1.2 - fitHeight() is triggered twice, the second time calculates the correct height (#2863).
The issue is caused by setting the form’s width to be 98% here. We’re setting this width _after_ we’ve calculated the height - meaning that the calculated height may be (and is) wrong. Closing and re-opening the edit form will fix it, as it can then calculate the height with the width already set to 98%.
I’m not really sure why this width is set at all, but either removing it or moving it to before we find the form’s height fixes the issue.

This bug has re-surfaced, confirmed in 3.4 but IIRC it’s also present in 3.2 and 3.3. Original issue above suggested this only happens when extra fields are added to the form, but I’ve confirmed the issue happens without that, for example:

It's the alert that's causing extra height it seems
Fixed with #7795
Most helpful comment
It's the alert that's causing extra height it seems