Leave it in. In the time it takes you to empty and refill there will be no risk of killing the bacteria or the media drying out. If you're seriously worried, over thinking and getting yourself in a panic about it, then put the filter (or media, depending on how your filter works) into a bucket of the old tank water you've just siphoned out, and it'll be fine.
Seriously though, stop stressing and just change the water all will be goooood