The tower and TRACON have to coordinate this with each other. TRACON sets the last aircraft on each landing runway on the old configuration, and Tower figures out the last aircraft in their sequence to each departure runway under the old configuration. Some planes do have to take off and land with unfavorable winds when the winds shift.