Okay, I understand.
And in standard Heroes maps, like "Neighbors" and others, is there a ban on heroes?
If I understand correctly, it works like this: the map specifies the allowed heroes, not the prohibited ones?
If the function is closed, all heroes are allowed.
If the function is open, only the heroes specified in that function are allowed.
The map editor automatically creates a list when creating a map, which includes all the heroes it knows (8 heroes from each Faction, 64 in total). Therefore, you either need to add heroes to the map or close the function.
The Random Map Generator has this nuance implemented more conveniently; the generator does not enter allowed heroes; it immediately creates a map with the function closed, and therefore, you don't need to "edit" the RMG map for a mod (let's say mine); the heroes will be available immediately.
Personally, in my mod, I have reworked all the maps that are in it and closed the functions so that I don't have to enter all the heroes into them.