It will not be advisable to make transactions in bitcoin within a country where cryptocurrency transactions are illegal by the law. But Imagine this scenario that someone has been using their bitcoins for transaction secretly successfully, and then one day decides to use the bitcoin that they have to make payment for something like a property to the owner of the property, If there is this kind of problem for instance where the owner of the property decides to claim that they did not receive any money in bitcoin, and the case is taken to a law court, what do you think the outcome of the case will be?
If proofs of payment are provided but in cryptocurrency, do you think the court will consider it even though transactions are tagged illegal with it? or will the case be thrown out and the owner of the property with the false claim of not receiving the money be allowed to go freely?
The final verdict will probably depend on the country and how the laws work there. Suppose it's a country where there is respect for the law and there is no corruption or anything. In that case, the court will ask both parties to submit proof, such as the buyer should show proof of the payment since he claims he made the payment, and the seller will then need to prove that he didn't receive the transaction considering the seller sent the funds in a wallet that can be linked to the buyer in some way. If he sent them in an unknown wallet, I don't know how they will be able to prove that the address belongs to the seller, so that can be a negative point for the buyer.
However, if the buyer can prove that the address receiving the funds belongs to the seller then the court will surely investigate to find out if the funds are received or not, and if received, they will either be returned or confiscated considering the use of cryptocurrencies is illegal within the country, and the buyer might be charged a penalty or something for it.
One thing in this case is clear, the buyer will not get out of it without any trouble because you are using cryptocurrencies when it's illegal, even if the seller doesn't get away with it and with the funds, the court will probably not let the buyer have the funds as well unless they charge him a heavy fine on it.