It seems when addMagazine or addMagazineCargo is used on the local player owned object (uniform,backpack,vest) it won't be present on the server with getMagazineCargo unless the player then drops and picks up the magazine again.
As per the documentation the effects of this scripting command requires the arguments to be local but the effects are global. So these magazines should be present on the server.
This may be intended functionality because this isn't reproducible using global variants of these scripting commands however when you are working with a local unit on the player client and are adding magazines in a forEach Loop, you don't want to lagg the network and send a global command to add a magazine for each mag.