When you die after starting a treasure fight, you won’t be able to get the treasure. I tested it and died in purpose, each of those I wasn’t able to dig up the treasure knowing I got all of them. Not sure if it’s on purpose though, it would be stupid if it is.