Any difference in the datastruct of an item will result in a new item being generated with a new ID. Also pretty sure ive seen duplicates, but those handaxes are probably nearly identical with some small difference, for example, there are brand new ID's generated when you equipt an item, as there's one data point in the struct that gets changed to indicate this in your inventory and hotbar with a little icon.