Hi, @Aleksei_Michnik !!
To get straight to the point, I believe the issue can be resolved by rebuilding it using a Custom Element instead of an HTML Component. When using a Custom Element, it is embedded in the Wix page as an element with a definite width and height. As a result, there won’t be any unnecessary blank space caused by the height of the content (in your case, a form) inside the Custom Element.
As you may already know, with an HTML Component, if the content exceeds the predefined height, a scrollbar appears. Conversely, if the content falls short, unwanted blank space remains. That’s why rebuilding it with a Custom Element is the best solution.
That said, it’s not entirely impossible to dynamically change the height of an HTML Component through rather forceful means. For instance, you can write CSS targeting the iframe in the custom code area and set its height accordingly. If you dynamically modify that height value, the height of the HTML Component (iframe) will update accordingly.
To give you an idea: Inside the HTML Component, you can calculate the content height and use postMessage to send that height to the page code. Then, pass that data into a temporary Custom Element using setAttribute. From that element, you could append CSS to the document.head that sets the iframe height. That might allow you to dynamically adjust the height.
However, I honestly don’t think it’s worth going that far. 
There’s probably a good reason why Wix doesn’t allow the dynamic resizing of HTML Components in the first place. If you try what I described experimentally, you’ll notice something odd: even if you could dynamically change the height of the HTML Component, it still kind of “floats” above the Wix page rather than being part of its layout. This means it cannot push down any Wix elements below it.
It behaves like a ghost—it either floats over or under the elements on the page.
Say your page height is 1000px and your HTML Component was originally 500px tall. If the content inside later becomes 1500px tall, the iframe will extend beyond the bottom of the Wix page. That would look quite strange, wouldn’t it? But because the HTML Component “floats,” that’s probably what would happen.
That’s why I think Wix intentionally restricts dynamic resizing of HTML Components—to prevent exactly this kind of issue.
So, what should you do now?
Simple. Forget everything I just said and just use a Custom Element. That’s by far the best approach! 