Once the BB Bandits leave and the door drops, dig between the unbreakable bones. That's the way through.
Attacking the bones directly won't do anything — the game isn't looking for damage, it's looking for you to use the pickaxe in the gap. Line yourself up between the two of them and dig.