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 Last Samurai (2003)
The Fox Dancing in the Dusk (2019)
Chacha: The Princess of Heaven (2007)
Seven Samurai (1954)
The Tears of the Rabbit (2009)
Zatoichi (2003)
Jirocho Rises in Fame (1952)
Kagemusha (1980)
Isshin Tasuke: A Man Among Men (1959)
The Black Hood (1981)
Bored Hatamoto: The Mysterious Phantom Mansion (1954)
Shinobi: Heart Under Blade (2005)
Sanjuro (1962)
Ran (1985)
The Invisible Swordsman (1970)
Afro Samurai: Resurrection (2009)
The Tale of Zatoichi (1962)
The Tale of Zatoichi Continues (1962)
Sure Death 5 (1991)
Harakiri (1962)