which version and which doctype?
Otherwise add setTimeout and check it.
frappe.ui.form.on('Your DocType', {
refresh: function(frm) {
setTimeout(() => {
$('button.text-muted.btn.btn-default.icon-btn.explore-btn').remove();
}, 10);
}
});
I tested in both version 14 and 15. so it’s worked properly.