I think I understand what you’re asking.
Assuming you have a 5 day fixed duration task with a fixed cost of $500 associated to it. When the task is 20% complete the task shows an Actual Cost of $100 (20% of $500). However, if I change the task duration to 10 days, the tasks % complete drops to 10% (because we doubled the duration) and as a result, the Actual Cost drops from $100 down to $50 (which is 10% of total fixed cost. Based on this assumption of what you are asking…
I think your issue is how the Total Fixed Cost is accrued. Open the Cost table provided with MS Project. You’ll see the task, the fixed cost, and the accrual method column. By default, the accrual method is Prorated, which means the cost is spread out over the course of the entire task duration. If you change the task duration, the prorating calculation changes the Actual Cost, as illustrated in my example.
If you change the accrual method from Prorated to Start, then the entire cost occurs when the task starts. Likewise, when you change the value to End, all costs are not accrued until the task ends.
Looking at my example, if you change the Accrual method to Start, when work is first applied to the task, all $500 is applied as Actual Costs. However, if I later change the task duration to 10 days from 5, nothing changes on the Actual Costs since the costs are no longer prorated across the task duration. They are all accrued at either task start (in my example), or task end. Switching to one of these accrual methods, I think, will resolve your issue.