I'm not sure how to change GPT ad height and width after the ad has shown. I'm guessing you will have to detect the page height/width change and then make another call to GPT to get a new ad with the different sizes.
We could update the GPT tag template to support mapping to dynamically set the GPT height/width values. Then, it might work to call utag.view again (when the viewport size changes).. and that would initiate a request to GPT to get a new ad with the new dimensions.
You'd have to modify the GPT tag template to disable single request mode, then, using JS, destroy the ad and create a new HTML div with a new unique id.
You then need to define a new ad slot using googletag.defineSlot with the new size and then call googletag.display with the new unique id.
Its basically a lot of JS.