Hi Dev,
The bug is still found in 2023.
And i did some debugging hopefully this might help
robert Guiscards stats(initial)
HP: 150
melee: 14 + 1
m/p armor: 2 - 2 / 2 - 2
stats (after upgrade)
HP:200
melee 14 - 12
m/p armor: 2 - 2 / 2 - 2
Using Genie editor to edit roberts base stats
melee damage: 40
armor stat: 10/10
stats (inital in - game)
HP:150
melee: 14 + 27
armor stat: 10 - 9/10 - 9
stats (after upgrade)
HP:200
melee 14 - 12
m/p armor: 10 - 9 / 10 - 9
It might be a script tied to the campagin hard coding the values or a unit level script(however this is not found for other campaigns with heros “leveling up”)