Well, the invisibility effect is present on all colors. Even if the issue were related to the color, why does another hero, who was previously visible, become invisible after the first hero is completely removed from the game?
The time for far-fetched hypotheses has passed – the mod for the hero is broken. The paths to the hero's models are incorrectly specified in the character file, and it contains a file that "fixes" the character of another hero (or fixes the MapObject of the hero itself). Therefore, when it is removed, the other hero breaks, but that sounds incredibly unlikely.
Added 6 minutes later
You can also conduct the following test: try to place the hero in the map editor and see if the bug occurs there. If the bug exists in the editor as well, then it is NOT related to scripts.