Beds are fragile: breaking one destroys it. The only way to get a bed back is to break it with a tool enchanted with Silk Touch.
Beds don't drop themself when mined.
Beds will still drop if mined with silk touch. Works with modded tools like this silver axe I'm holding in this gif. This datapack wouldn't work with any kind of modded beds though, only the 16 vanilla beds.