Removed the custom enchantment as it is no longer supported this way in 1.20.4.
Imstead of giving it much thought I just add the hidden Thorns enchantment for now as it doesn't do anything on this item. Works just as well and actually cleaner code. Should be backwards compatible also.