Shopify Polaris Web Components primary-action button is not working

It looks like there is a bug in Shopify Polaris Web Components →

The repoducible code would be -
<s-page heading="Test app">
<s-button variant="primary" slot="primary-action" onClick={() => {console.log(‘button clicked‘)}}>
Enable Auto-Sorting !!!
</s-button>
</s-page>

The issue is that the onClick handler is not working if you navigate between pages.
I’ve added the demo below.
Does anyone else have this issue?
I know a workround (remove the variant="primary" from button) but this is not aligned with the docs. So it seems like a bug.

Same issus, this is a bug.

Also encountered the same issue the last few days. Removing

variant="primary"

from my primary action button worked. Seems like Polaris Web Components still have some rough edges here and there.

Did Shopify axe all of their good devs or is everything just AI slop now because Polaris is in the worst state ever :face_vomiting: