For example, using your analogy of die size, the RX 7700xt has almost 2x the silicon at 350 mm2 with 200 mm of that being on n5 and with the entire architecture using special packaging techniques to get the chips to work together. Yet even with a bigger cooler/heatsink/shroud/4GB more ram/more fans, the card is selling at 400$ compared to the 270 ish of the rx 7600.
If you go backward, 7800 xt N5 die at 200 mm2 is about 73% of the B580. Now incorporate increased yield of, say 5% and we are at around 69% die cost 7800 XT die. Given that 7700xt is a salvage die, you can use your judgement how you figure the cost reduction, but quite a bit. For the sake of argument, let's call it 9% reduction, for 60% N5 cost of 7700 XT die.
With remaining 40% of the budget, you would need to buy 3x 37.5 mm2 N6 dies = 112 mm2 which is cheaper than 40% of B580 budget. Again, much cheaper wafer price, and even greater difference in yielding 37.5 mm2 dies.
So on the die price, B580 is between 7700 XT and 7800 XT. Cost of packaging (RDL wafer) shifts the costs of Navi 32 cards higher, leaving B580 and 7700XT in the same ballpark.
B580 selling for $250
7700 XT selling for $400
while costs are approximately the same. And this is for AMD unfortunate generation.
If the rx 7600 is at barely breakeven(costing ~250$ to produce/sell), then the rx 7700xt would be losing AMD 75-100 dollars for each card they sell.
No, AMD entire graphics division is at breakeven. This includes all of the design, marketing, verification, mask costs.
AMD is making some gross margin on the cards alone, which is then reduced by overhead to operating margin breakeven.
Intel is not making any margin on the cards alone. So, it is not like selling more is going to improve things. There is no way to recoup the resto of the operating costs at any volume if the product has zero gross margin.