There is no official "secret code" associated with a Scooby-Doo "Sword Samurai" episode, game, or toy. The phrase doesn't match any episode title ("Scooby-Doo and the Samurai Sword" is a 2009 direct-to-DVD movie), game cheat, or merchandise code.
The show's humor comes from subverting samurai tropes—Shaggy and Scooby accidentally mastering kung fu, the villain being a greedy developer, the "ancient curse" being a projector. No hidden cipher needed.
If you're thinking of a specific video game (e.g., Scooby-Doo! Night of 100 Frights, Classic Creep Capers), a cheat code might exist—but it wouldn't be called "Sword Samurai." Share the platform/game and I'll check.