Last time I looked at this I stumbled across this thread, specifically this part:
You can also end up with dangling objects in packs. When that pack is
repacked, those objects will be loosened, and then eventually expired
under the rule mentioned above. However, I believe gc will not always
repack old packs; it will make new packs until you have a lot of packs,
and then combine them all (at least that is what “gc –auto” will do; I
don’t recall whether just “git gc” follows the same rule).
So it’s normal behavior, and does get collected eventually, I believe.
edit: Per Daniel, you can immediately collect it by running
git gc --prune="0 days"