A - B - C - D - E | | F - G - H
Suppose adventurers explore this section of the dungeon and either need to rest or want to search Rooms F, G, or H thoroughly (or otherwise deal with something in one of those room.) Basically, they're camped out in F, G or H. They can exploit the way wandering monsters work by having guards stationed in two places: between A and B (closer to B) and between D and E (closer to D.) Preferably, two guards at each station.
Unless there's a secret door or passage, wandering monsters are going to come through either A or E. If the monster gains surprise, the distance will be 10 to 40 feet, still plenty of time to shout a warning. By placing guards far away from the base camp in this way, you gain time to react.
Let's say the monster shows up at A; one of the guards at E can notify the rest of the party in F, G or H. The other guard at E remains to keep that route clear. Half the adventurers re-group between B and F, closer to B, retreating to draw the monster towards F. The other half fall further back, perhaps to H. Once the monster has entered the passage between B and F, the reserve force at H can head through D and C to attack the monster from behind. Or, if the encounter is going badly, they can seal the BF passage if possible and retreat to D; everyone fighting the monster runs, and once everyone is through, they seal DH if possible. They can now head towards A or E, and if DH was sealed before the monster could see which way the party was heading, there's a 50-50 chance the monster will take the opposite path.