Bug? Button doesn't update as param changes

I’m seeing unexpected behaviour when trying to change a button in response to a parameter value changing.

What I expected: Button name and JS callback function change as param value changes
What happens. Button name and JS callback function are stuck with value button is first initialised with, even though StaticText widget does update.

Screenshot:
image

Sample code:

import param
import panel as pn


class ExamplePage(param.Parameterized):
    my_number = param.Number(label='My Number Slider')

    def __init__(self, **params):
        params['my_number'] = 5.0
        super().__init__(**params)

    def my_view(self):
        print("CALLED VIEW")
        button = pn.widgets.Button(name=f"Button with value {self.my_number}")
        button.js_on_click(code=f"console.log({self.my_number})")
        return pn.Column(
            pn.widgets.StaticText(name='StaticText: My Number Value', value=f"{self.my_number}"),
            button
        )

    def layout(self):
        return pn.Column(self.controls, self.my_view)

    def controls(self):
        return pn.Column(
            pn.widgets.FloatSlider.from_param(
                parameter=self.param['my_number'], start=1, end=10, step=0.1
            ),
        )

template = pn.template.FastListTemplate(title="Example Page")
template.main.append(ExamplePage().layout())
template.servable()

It’s not clear to me if this is a bug, or a misunderstanding of how the Panel Button works.

I observed the same behaviour with the TooltipIcon widget.

Panel version: 1.3.4