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
Zatoichi (2003)
Two Portraits of MIYAGINO (2010)
Blizzard Ronin (1939)
Guitar Men: The Darkest Secret of Rock 'n Roll (2007)
Black Fox: Age of the Ninja (2019)
The Hidden Fortress (1958)
The Fox Dancing in the Dusk (2019)
Chacha: The Princess of Heaven (2007)
Fall of the Shogun's Militia (1954)
Kurama Tengu: Anonymous letter to Tengu (1952)
Ran (1985)
Sanjuro (1962)
Kagemusha (1980)
Japan: Memoirs of a Secret Empire (2004)
Throne of Blood (1957)
Versus (2000)
Jirocho’s Days of Youth: Boss of the Tokai Region (1960)
Lowly Ronin 5: The Teenage Orphan Girl (1983)
Iemitsu, Hikoza and Isshin Tasuke - A National Crisis: Edo Castle in Danger (1989)
Utamaro, Painter of the Woman (1959)