Holmgang, like every ability, is based on distance to the enemy's hitbox. Basically, as long as you're in melee range, you can use Holmgang so you shouldn't have any issue with it (assuming you do want to keep hitting the boss).