Yes, which is why you are not going to have gas powered tractor trailers or construction equipment.Gas engines have narrowed the gap in the last few years. there is still more BTU's of energy in diesel and that will always be a constant. The operation of a diesel having to compress it to ignition makes it more efficient compared to a gas engine having to spark to ignite.
But extracting that power out of the diesel requires sturdier components to deal with the higher compression ratios - which means more weight and/or more expensive materials.
When it comes to economy passenger cars, the manufacturer cannot just eat that cost. So that engine has to be priced up.
Now going back to the point that OP brought up, that did work in the past when the fuel economy advantage was substantial. But the advantage has been crushed from both ends - new turbo gassers are much more efficient and the TDI efficiency was based on fraud.
Diesels in light passenger vehicles can still be sold based on the torque argument - but that would only work in pickup trucks (where the need is legitimate) or luxury vehicles (where the added engine costs are small relative to overall manufacturer margin).
They will keep selling smaller diesels in europe because the governments and auto makers are complicit in the emissions fraud, but they will maintain the facade to both preserve jobs and appearance on 'doing something about climate change.'