Some items are missing in Stock Entry generated from Job Card

In our ERPNext v16.20 pharmaceutical manufacturing process, material transfer is handled based on Job Cards.
When we click Make Stock Entry from a Job Card, in some cases not all items in “secondary items” are transferred to the Stock Entry.
In our setup, semi-finished goods are usually transferred to the warehouse after each stage and later returned to a virtual WIP warehouse.
Is there any solution for this?

Can you please create a GitHub issue for this?