The DefaultNotificationItem creates a url automatically if you fill data.badge_id, topic_id or data.group_id.
I tested this approach and it works. Just fill data.url and use this in a theme component:
api.reopenWidget("custom-notification-item", {
url(data) {
return data.url || this._super(data);
}
})