I suggest that you change the structure of the component to remove the boolean operation from it, because smart animation may not behave as intended.
This is what the component should look like:
Button // (auto layout frame)
Overlay // (an absolutely positioned frame with the Clip content property checked)
Text // (with the component's text property applied)
Text // (with the component's text property applied)
At the Button level, add the background color that should be on hover. Also add a fill to the text that will be visible on hover.
At the Overlay level, add a color that overlays the background (i.e. visible on the button at rest). Add a fill to the text inside the overlay that will be visible at rest.
Now you can add a variant to the component set that will only need to change the height of the Overlay layer. Add an interaction and set your desired animation.
You can see an example file here:
Figma – 31 Mar 23UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank