Not entirely. For example, the Feds give tax breaks to Churches also, but if that church gets overly political, it can lose that tax break. Same seems to be here, but I am not sure of Virginia’s reasoning.
For how long, and how do they qualify?
In that particular case, it would apply to all churches regardless of their politics.
Web search says since 2012 or 2013. So, more recent than any of the formerly segregated, tax-exempt, Virginia colleges began admitting Black students. But I do not see that as a good basis for tax code viewpoint discrimination..
Women qualify by having a Confederate ancestor who [did not take] the Oath of Allegiance before April 9, 1865, this being when Lee surrendered to Grant. That’s a nasty criteria excluding those impressed into confederate service who subsequently deserted to the union side. It’s proof that the Daughters of the Confederacy has a pro-confederate viewpoint.
However, I am against the government using the tax system to favor viewpoints I like. I agree with this:
Imagine a red state legislature enacting bill discriminatorily denying nonprofit tax exemptions to left-wing “social justice” groups, or groups promoting racial minority group rights (such as the NAACP), groups promoting abortion rights, and so on. Such a bill would obviously violate the First Amendment. The Virginia law targeting pro-Confederate groups is much the same, differing only in its ideological valence.