If you trade with an entity that has an obligation to honour sanction lists (i.e. exchanges), they should return you the coins.