Firstly I assume you have an AEG, not a GBBR or PTW.
What is happening is the midcap isn't seating fully into the magwell and is not able to release the latch on the magazine which allows bb's to feed into the hopup. You can modify the magazine to fix this issue. The mod is as follows:
Remove all BB's from the magazine.
In the tube, were the BB's feed, you will see a latch that sticks across to prevent BB's from pouring out when the magazine is out of the gun. This is the latch that is engaged when you put the magazine into the gun, it is engaged from the bottom of the hop up pressing into the magazine. You need to shave a LITTLE bit (like, 1/10th of a millimeter at a time) off of this latch with a razor.
You need to shave enough that it is easier for the hop up to engage, but not too much, so that the BB's stay in the magazine when not loaded in the gun.
Do not fuck up, if you take too much off, there is no easy fix other than to buy a new magazine. You have been warned.
If you need photos, I can arrange to get them to you in a couple days, or someone else might pipe in.
This is an issue I had with King Arms magazines when I ran a KWA. Fixed all the feed issues on every single magazine.
You can clearly see the latch here.
Make sure you push the BB follower (the plastic piece that pushes the BB's through the magazine) down and out of the way of the latch before you cut it. The follower looks like this: