If you use commands to get a book with an enchantment past its max level, and then you try to combine it with a sword or other tool in an anvil, the anvil will only give you the maximum level of that enchantment, even if the level on the book is higher. Is there any way to bypass this?
The only way I know of is making a custom system where you would drop the enchanted book on the ground. But if I have many levels of enchantment books in my map it will require way too many command blocks unless there already is a datapack for it. There is probably a mod that will make this work, but I don't want to take the path of using mods unless this problem is unsolvable in vanilla.
See example video below: