Using addWeapon script command on an AI, only giving a sidearm, makes the unit unable to react to behaviour mods: safe and careless, the unit keeps it's sidearm in it's hand
I tried to give the unit a primary weapon and remove it right after, using the units Init field, or using sqs and sqf to create unit with the same Init field and it worked fine, but simply gearing up makes unit unable to holster all the way(init field, sqs or sqf.
Using trigger or delayed script to remove the gun later, not in Init field still leads to the same bad result.
If you take an existing unit with sidearm(for example the NATO Officer), and put into it's init field the command to remove it's primary weapon has a good result, AI holsters fine.