i want to force windows remember the size and position of a windows i close, sometimes i expand to make it bigger or smaller then i can't resize it because its too big

what can i do so that next time i open the window again, it remembers how i closed it?