When resizing a height field, the window always doesn't resize properly

This is a bug. I have not yet been able to figure out what I'm doing wrong. Resizing currently only seems to work when the window size increases.