And, since some immigrant residents have been newly wary of going out in public — Ms. Raicovich said attendance noticeably dropped after the election — the museum has been holding events in people’s homes and on their blocks. “Xenophobia is not a new thing,” Ms. Raicovich said. “Our work has just intensified.”

A politically outspoken museum director could run the risk of alienating trustees, donors and potential future employers, who may disagree with her views or deem such advocacy inappropriate. But so far, the Queens Museum board has supported Ms. Raicovich. “This is an engaged time, and she is an engaged leader who has placed values of difference and multiplicity at the center of her leadership,” Mark J. Coleman, the museum’s chairman, said.

Artists also say they appreciate Ms. Raicovich’s bold stances. “Having a young director brave enough to talk about issues that are directly affecting Americans — especially people born Dreamers — is so worthy,” said the conceptual visual artist Mel Chin, who will have a retrospective at the museum in April. “Someone in a position to speak out on behalf of people who don’t have voices is what it’s all about.”

To help New York’s cultural institutions through this thicket, the city’s Department of Cultural Affairs and the Ford Foundation last spring invited arts leaders to a discussion with legal experts on what is permissible for nonprofits in lobbying and political activity. Nonprofit laws bar institutions from engaging in electoral politics and holding political fund-raisers, a hornet’s nest the Queens Museum ran into this past summer when it appeared to cancel and then reinstate an Israel-sponsored event after accusations of anti-Semitism.

Two city officials in August called for Ms. Raicovich’s removal, and one of them, Councilman Rory I. Lancman, said in an interview this month that he is still awaiting the results of the museum’s investigation into the matter.