One quick solution that comes into my mind is to apply the border on a pseudo-element:
.border{
position: relative;
}
.border:hover::after{
content:'';
position:absolute;
width: 100%;
height: 0;
left:0;
bottom: 4px; /* <- distance */
border-bottom: 2px solid #000;
}
(example)