Warband will clip your skins once they have a value > 15 during a file save.
Make very sure you do not have > 15 (counting from 0) skins defined at module_skins.py
WSE2 sort-of lets you run more skins, but they still get clipped when saving. You need to store the skin_id to another slot and periodically set each troop using high skin values to the saved value. I did that successfully at the mod I am now working on, for 23 actual skins and another 10 virtual skins for role playing relations buff/debuffs. This is a continuation of something I made for Warsword Conquest around 7 years ago. At the time I gave up on > 16 and made virtual skins for coding and under 16 for drawing, but actually you can push it a little, just you have to recover from a reloaded savegame where all the skins come back < 16.
You also should look at the masks applied at header_troops.py starting with
tf_hero = 0x00000010
this line. That is blocking use of skin 16 you need to redefine these masks.