Perhaps, due to some coincidence, this hero was hired by the enemy (a bug in the game?). Or it could be an error by the author during map creation: first, they imprisoned a specific hero, and then they prohibited him in the map properties. Unfortunately, if it were a single-player map, we could check some things with Prospector.
Where did you get this campaign? Can you provide a link? If you extract the relevant map from the campaign, you can examine it in the editor.
(Василь Симоненко. Люди – прекрасні)