After the Great War, Vilnius frequently changed hands during the Polish–Soviet War and the Polish–Lithuanian War but eventually became part of the Second Polish Republic. The Polish government restricted Lithuanian activities, often arresting and imprisoning Lithuanian activists. Vileišienė was arrested several times. For example, she was arrested in 1919 for protesting against Polish plans to exhume the bodies of Lithuanian soldiers and she was imprisoned for one month in November 1922 because the school dormitory did not have a proper sidewalk. In September 1928, Vileišienė set out on a 22-month trip to United States to collect donations for orphans and others in need. After her return, she received a pension and was able to retire. She died on 26 August 1935 after suffering a heart attack in January during mass at the Church of St. Nicholas. Her funeral was attended by many Lithuanian activists and she was buried in Rasos Cemetery.