If spells obtained from the "Arcane Mastery" perk cannot be passed on, then the question arises: what about artifacts? For example, if the first hero has a scroll, such as "Berserk," will the second hero with the "Scholar" perk learn the "Berserk" spell? And further, if an enemy casts "Berserk" in battle, either from a scroll or a spellbook, will it be learned?
Added after 20 hours and 30 minutes
In short, I tried to learn spells from a scroll, but it didn't work. I did this: I taught the hero "Education" and "Unravel Secret," then used the scroll in battle, but it wasn't learned. The last thing left to check is to give the scroll to an enemy hero, then have another hero enter the battle and force the enemy hero to use "Berserk" from the scroll; maybe that way it will be learned, although it's a lot of trouble, I'm just curious. If anyone has tried this, let me know if this method works or not.