Mask off andd refinish complete boards. That is, don't refinish just a portion of a strip of wood flooring. Refinish every part of any board that is damaged.
By taking the repair to the breaks between the boards, you're minimizing differences in gloss that would stand out like a sore thumb had the transition between finishes taken place in the middle of a strip of hardwood flooring. Once refinished you can sometimes buff the gloss down to get a closer match to the original floor.