Hi, @Interpro
I'm really sorry for the inconvenience.
Based on what you have described above, it would most likely be the move trick.
As explained above, using trick or moves like switcheroo to wild pokemon makes you permanently switch both items.
Note that you can either catch the wild pokemon that you switched item, or use trick again to retrieve the item back.
Keep in mind that if you kill or run from the following pokemon, the item will be permanently gone.
Unfortunately, with the current tools, we cannot track whether you lost a choice scarf with the move trick or not, so it would be hard for us to compensate for your lost.
I hope you understand.
I'm once again really sorry that I cannot help you much on your issue.
Have a nice day.
Kind regards, HappyMango.