I can't reproduce this issue here, if I join a #channel and then /part #channel, the channel window is closed only when the PART event from the server is received. Can you describe a step by step process that reproduces the issue you are seeing?