How about they just don't hard code in the 4 player requirement? Any time there would be something that needed to be limited to 4 for ease of balance or camera angles or whatever, just set everything up for the first four characters in a party and leave room in the code to change that variable from 4 to 6 and ignore the bugs that can happen from changing that variable. Then all it would take is for the modders to go hunt through and tweak the variables and maybe tweak camera angles, etc. Then it is on the mods/modders when things break, because they tweaked the values of the shipped code, not on Larian who had everything optimized when they shipped it.
Group skill check? Larian configures an open variable that say check first 4 character slots to see if a character has a higher chance. Modders can come in and switch it to first 6 character slots. This is an overly simplistic example, but it is a design philosophy that we have seen in other games with equally complex code. Bethesda games are a great example of this: by default most of their games allow only one or two followers, but one of the first mods that get created for their games are unlimited follower mods.
Personally, I think this is the best of both worlds, because again, Larian isn't 'responsible' for modders breaking into their house by tweaking variables. But they can be considerate to the modders and player base by leaving the door unlocked so to speak.