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 Betrayal (1966)
The Pass: Last Days of the Samurai (2022)
Sure Death 6 (1996)
Samurai Cat: The Movie (2014)
Sucker Punch (2011)
Goemon (2009)
Oshidori kenkagasa (1957)
Taikoki - The Saga of Hideyoshi (1958)
Samurai Rebellion (1967)
Genkuro Yoshitsune (1962)
Benkei (1997)
Eight Men to Kill (1972)
Last Days of Edo (1941)
Sea Raiding Unit (1939)
Fighting Yasubei (1952)
Last Days of the Samurai (1957)
Records of loyal vassals (1962)
Shogun's Holiday (1958)
Jirocho’s Days of Youth: The Youngest Boss in the Tokai Region (1961)
Yagyu Jubei: The Fate of the World (2015)