I'm not sure about the door open vs. closed thing, but I can tell you I just spent the last six hours with my door torn apart because all my windows stopped working a few weeks ago. Several threads discuss the exact issue I suffered - a severed light blue/black striped power wire going to the master switch in the driver's door. Before all my windows stopped working, they worked sporadically. If I had $5 to bet, I'd say the power wire, which is prone to stretching/severing due to Ford's need to save 2 inches of wire on every Explorer, is about to break. It may be that it's making a connection when the door is open and stretching enough to lose its connection as the door closes.
If all windows stop working altogether, this is the first thing I'd check. However, just in case, and as a potential time savings, crawl under the steering wheel and look at the fuse panel. There should be a fuse puller hanging by the fuse puller. Pull fuse 17. If it's bad, replace it - your problem should be solved. If it's good, proceed.
I gotta warn you, this is a serious PITA to get to, but you can do it with some patience and time. With the door open, you can pull the rubber boot back at the door (this is where mine broke), but mine looked fine initially. It wasn't until I removed my door panel, disconnected all the connectors I could, removed the sound deadening baffle, and unwrapped the harness of its electrical wire all the way up to where the harness enters the door, before I saw the break. If you have 4 inches of 12 gauge wire and some electrical tape, you'll have it fixed in five minutes.
Since yours is an '03, it's likely identical to my '02 in terms of how to remove the door panel. Get a flat tip screwdriver or, better yet, a putty knife, and pry off the plastic cover around the door handle. At that point, you should be able to remove the door lock/window buttons/window lock assembly and pop off the three connectors. This is a good time to see if a broken wire is your problem. Grab a voltmeter, set it to DCV (DC Volts) 20 ("20" volts is the right setting since you have a 12-volt auto) and stick the positive lead of the voltmeter in pin 6 of the connector (this is on the opposite side of the connector from where the light blue/black striped wire enters the connector) and put the voltmeter's negative lead to ground (try to find a bolt on the frame that doesn't have paint on it or, better yet, if the leads are long enough, put the negative lead on the ground side of the battery). Do this with the ignition ON. I did this and got a reading of "0.0" so I knew I was not getting power to the connector. Given your issue, I'd do this test with the door open and closed. If you get "0.0" or less than 10 volts, proceed.
Go back to the area just above the door handle. You'll notice a single screw holding a white plastic bracket that provides support for the arm rest. Remove that screw. You'll also notice two screws at the very bottom of the door panel. I believe they're 7/32 or 6mm. Remove them.
At this point, you can lift the door panel off the car. I swung it around and rested it on the running board while doing the work. I also had to leave it there because I wasn't smart enough to figure out how to remove the connector for the @#$%ing memory seats! Remove the speaker and disconnect it.
Remove the sound baffle. Be careful not to tear it. Before you reinstall it, go to Wally World and hit the window weather stripping aisle. You can pick up some double sided "Duck" tape in a 1/2 inch x24 foot roll for $2. Once the baffle is removed it'll make sense where to apply the double-sided tape.
As mentioned above, I couldn't remove all the connectors to just pull the harness through the door and check out the light blue and black striped wire. So, I had to slowly, painfully unwrap the harness of its eletrical tape until I got up to the door opening. This also required some extremely sensitive use of an exacto knife.
I hope this helps. I couldn't find the above information yesterday when I was researching how I'd go about this, so I figured I'd give you as much info as possible (sorry if it's too long).
So, for $7 and some of your time, you'll further cement your stud status with your girlfriend! Make sure she takes you out to dinner since you saved her $200.