There is a known bug with hero XP being lost during maintenance if the hero is not idle during maintenance. This bug has existed for a very long time.