This seems to be a server desync type issue, but it's fairly replicatable and I've experienced it numerous times.

Fire all rounds from primary. Fire all or some rounds from secondary. Switch back to primary. Reload. Switch back to secondary. Reload. Switch back to primary, gun is empty as if it was never reloaded. I have also experienced reloading the primary a second time and observing the secondary to be empty again. All these reloads were completed until the bottom-left icon showed the gun as loaded and all animations were finished.

Seems to happen around hit registration issues, it's like the two things go hand in hand. I've experienced this 4 times now and all 4 times I experienced major hitreg issues in the preceding gunfight.