Bored Hatamoto (1930)
Bored Hatamoto: The Imposter

Overview
Around the Genroku era, there was a man named Saotome Shusui-no-Suke, nephew to the senior councilor Matsudaira Sakon Shogen. He was commonly known as the Bored Samurai of the Hatamoto rank. Just as he was engulfed in boredom, Tokugawa Jo-Kaibo, claiming to be the Shogun's illegitimate child, made a grand entrance into Edo. At the behest of Sakon Shogen, Shusui-no-Suke was tasked to investigate Jo-Kaibo's background and had his young page Kyoya disguise as a woman to infiltrate Jo-Kaibo's gun mansion.
Similar
The Men Who Tread on the Tiger's Tail (1952)
Tenchu! (1969)
Taikoki - The Saga of Hideyoshi (1958)
Shogun's Holiday (1958)
Like the Clouds, Like the Wind (1990)
Samurai Avenger: The Blind Wolf (2009)
Shinsengumi: Assassins of Honor (1969)
Shogun's Samurai (1978)
Kabuki Akadō Suzunosuke (2022)
Fighting Yasubei (1952)
Last Days of the Samurai (1957)
Lowly Ronin 5: The Teenage Orphan Girl (1983)
Iemitsu, Hikoza and Isshin Tasuke - A National Crisis: Edo Castle in Danger (1989)
Shinobi: Heart Under Blade (2005)
Samurai Fiction (1998)
A Color Print of Edo (1939)
Kagemusha (1980)
Ran (1985)
Sanjuro (1962)
Versus (2000)