Minecraft wiki entry for Minecart_with_Hopper, associated text: Breaking a minecart with hopper by attacking it causes the minecart, hopper, and any contents inside to drop as separate items.‌[until JE 1.19]