It depends on your distance. He won’t let you get within a few spaces of him so if you’re close enough he will burn a turn to move further away and won’t shoot at you. When he follows you back through the door you get a free hit because he will use his turn to escape back through the door and won’t attack. You still get to hit him first because it’s a surprise attack when he comes through the door. Follow him as soon as he retreats and he’ll still be close enough that he’ll run and won’t attack. Then you retreat without attacking and he’ll follow to find out where you went.
Sometimes he won’t follow back through but he does more often than not.
Tom and B’Elanna, not Tom and Janeway.