How to change the link associated with a button in the user menu panel

Actually, you can go even further and omit that:

      api.reopenWidget("user-menu-links", {
        profileGlyph() {
         const glyph = this._super();
         glyph['data'] = { url: `${this.attrs.path}/activity` };
         return glyph;
        }
      });

As there are no arguments