Hello,
I'm creating custom companion (creature) that uses super mutant skeleton.
I have noticed that he's losing his weapon very often (enemy shoots his weapon) how to prevent that ?
The way you do this is create a custom weapon just for him (copy an existing one if you like), in the weapon's flags you click off like "can not drop" (I think that's it) and "playable" is not selected,, then you edit the creature's inventory and put the weapon in there.
Emulate the setup of, for example, Charon and his shotgun, to get that working. Charon's shotgun is set up to never run out of ammo, I'm not sure quite what you wanted to do with that.
It does not apply to weapons the player gives him, just that one he spawns with. You sorta cannot make NPCs never drop any weapon the player passes them, the flags that provide this are special and live on custom weapons only.