Your ERP calculates every price. Why is the margin still leaking?
Business Central defines the best price as the lowest one with the highest discount allowed on the day — its own documentation says so. Finance & Operations builds the price from attributes and component codes you configured. Both tiers calculate correctly and neither decides what the price should be, which is where the margin goes.