Using custom enchanted books in an anvil (Minecraft) [duplicate]

Anvils cannot process the book because it is higher than the survival level, which the anvil is coded to use. The only way to do this would be the

give @s diamond_sword{Enchantments{id:unbreaking,lvl:5}}

command or /enchant command.