Hiding Cancel button under menu item

I am trying to remove the “Cancel Document” button from the menu item. Even if I disable cancelling option through user permission, users are still able to cancel the document through the button under menu. Any idea on how I should go about?

for which doctype? what have you done?