As far as I understand, this is a very old bug, I see it from time to time for a month.
From what I noticed, usually after such a capsule is destroyed, several creeps come out. Either one capsule gets stuck in another, or it gets into some kind of geometry joint and does not realize that it has reached the ground.
Apparently it’s worth adding a check for the maximum lifetime of the capsule. Measure the time it takes her to get from one base to another, and after it expires, automatically spawn creeps and destroy the capsule. Otherwise, she can stand unnoticed for a very long time and aggro creeps.