Had a similar noise last year on my CD250 Honda which I use for day to day transport to work and back. The bike was 18 years old and probably still on the original chain (20,000 miles when purchased 6 years ago, now 37,000 ). Although regularly cleaned & lubed, the chain adjusters ran out of adjustment a few weeks ago, being the cheapskate that I am, I removed a couple of links, next week I heard the same noise on the way home from work, a mile later, the chain came off the sprocket, turns out one of the side plates had broken, fortunately, I was able to get the chain back on the sprockets and ride the remaining 7 miles home at a very sedate pace.
Chances are the "mechanic" who replaced your chain and sprocket didn't rivet the soft link properly, or correctly install the circlip if that's what they used
Chances are the "mechanic" who replaced your chain and sprocket didn't rivet the soft link properly, or correctly install the circlip if that's what they used