Utilize the backgroud-clip
property for this purpose.
The background-clip CSS property determines if an element's background will go under its border box, padding box, or content box.
MDN
Adjust your button size to 40px x 90px and include a 3px padding.
When hovering, set background-clip: content-box
so the background color is limited to just the content area and not the padding.
An oversimplified example is provided below:
body {
background: lightgreen;
}
.button {
height: 30px;
width: 80px;
border-radius: 22px;
background: blue;
display: flex;
justify-content: center;
align-items: center;
margin: 2em;
padding: 8px;
border: 1px solid red;
color: white;
}
.button:hover {
background-clip: content-box;
}
<div class="button">Button</div>
By observing the border, you can see that the button's dimensions remain intact while the background no longer extends up to the border from the content.