when clicking maximize button - you need to then move the window slightly in order for x/y position to be saved - just clicking maximize alone is not enough