Yep, I don’t think this is something you can easily do natively.
Two ways that I see:
-
Use
posts_orderby
to modify SQL request and order posts by post type, then just need to check so headings don’t repeat. -
Instead of looping through posts in order returned, take array of those and sort by post type before looping for output.