Adding a sublayer to a Glass UIButton to work as a border

I want to set a sublayer to a UIButton's layer, using a Glass or Prominent Glass configuration, setting the strokeColor property acting as the border to a UIButton's bounds.

The main issue I'm facing is not being able to follow the button's bounds when it changes as it expands on touch down.

Is there an expected pattern for applying sublayers to a UIButton and make it follow UIButton's bounds as it changes during interactions?

Adding a sublayer to a Glass UIButton to work as a border
 
 
Q