Iframe is resized only after all chunks are loaded

In order to reduce TTI, I am using code splitting in our application and it is working correctly.
However Iframe is not getting resized till all chunks are downloaded. And it looks like below and does not get resized till all chunks are downloaded.

Looks like it is resized only after window.onload.

Is there a way to resize iframe before I start pre loading of chunks?