Cargo flights are different, and you should also look at total program costs from the deal with NASA. The NASA contract [1] was for ~12 launchs, minimum 20T of cargo for $1.6B. That puts the total program cost at $80,000 per kg. The space shuttle program costs were about $60,000 per kg.
But don't take my word for it, here's a quote from a NASA scientist saying their payload cost per pound went up. [2]
"My cost per pound went up with these rockets," Margasahayam told Tech Insider. "On the shuttle, it would be much less."
The article there cites per-kg costs at $10,000 on the space shuttle vs $27,000 on SpaceX. With the Dragon it came down to about $9,000 per kg, which is again about 10% below the price NASA was paying for the shuttle.[1] https://www.nasa.gov/offices/c3po/home/CRS-Announcement-Dec-...
[2] https://www.businessinsider.com/spacex-rocket-cargo-price-by...