I'm not sure about courts, but the government over here will definitely recognize that I owned the coins and that I later stopped owning them - by collecting taxes on the transaction.
I have't seen anyone trying to push that on to courts, which indicates that the expectation is that courts have the same idea on coin ownership.
I'm talking about the "use blockchain to prove ownership of a domain" or whatever else people are talking about. Money is different as the non-fungible part of money already exists. It's called cash, and even ownership of that is able to be adjudicated. They can sue you for back taxes and you can sue to say you do not own certain taxes.
In this context, maybe a closer analogy would be information "ownership". While in a typical database, you can order the change of an entry by fiat, you can't do that on blockchain without the crypto key.
Revealing a secret cannot be forced by the court, be it a password, or a recipe. Best courts can do it "encourage" one party to do it. Even then it might be in vain, if the information was forgotten. Courts do deal with it somehow, more out of necessity than choice. That would be more similar to getting the keys to a domain or any other blockchain asset.