I would turn that concept around.
You are trying to shape the game screen to your iframe.
I would:
After exporting, change the CSS in the index.html file to make the iframe the same ratio as the project viewport.
If that is not an option, the best approach to get rid of borders is by using scale outer.