Consider the following:
- If Mission A is currently in progress
- Planet B is producing the resources needed for Mission A
- However when you collect resources from Planet B, instead of counting the resources towards your mission they are automatically converted to goal coins

It may be because: The resources needed for Mission A do not actually come from Planet B.

Here's how you can check: Go to the main page, find Planet B, check the resource it produces (Tap Info at the bottom to see the planet's "product") > Return to Mission A and confirm which resources you need to complete it.