Visual glitch when resizing width of button element

Hey there, so I have this weird problem with a button element that I’m trying to animate.

My button has a fixed height of 3.5rem and width set to auto.

My animation takes the button scales it up, reveals some content, etc. and when the user leaves the section it should resize to width 3.5rem and remain the height of 3.5rem.

But as soon as the user leaves the section the button goes to 200vw width and then scales down to my desired size.

What am I doing wrong here? Any suggestions?

Edit: Button is in the second section called section-button