I think for purposes of the Federal Statute you are NOT a Virginia resident for legal purposes, even if you reside/live in Virginia. I also think that for purposes of Virginia state law you are not a legal resident of the Commonwealth of Virginia. You are legally the resident of the state where you are registered to vote and that issued your DL. I may be wrong, but were I you, I would consult a very knowledgeable attorney before I would purchase a handgun from a private individual in Virginia.
You can be a dual-state resident.https://www.atf.gov/firearms/docs/ruling/2010-6-state-residence/download
ATF has previously addressed the eligibility of individuals to acquire firearms who maintain residences in more than one State. Federal regulations at 27 CFR 478.11 (definition of State of Residence), Example 2, clarify that a U.S. citizen with homes in two States may, during the period of time the person actually resides in a particular State, purchase a firearm in that State. See also ATF Publication 5300.4 (2005), Question and Answer B12, page 179. Similarly, in ATF Ruling 80-21 (ATFB 1980-4, 25), ATF held that, during the time college students actually reside in a college dormitory or at an offcampus location, they are considered residents of the State where the on-campus or offcampus housing is located.
The issue is where you are sleeping. Not where you are registered to vote. IF you are sleeping in state A for a significant period (even a limited period) and that is your residence for that period, (such as a college student living in offcampus housing as above).
Have two addresses in two states does not qualify. You must actually reside
in each of them for some significant period during the year, to the exclusion of the other.
However, to be very clear, you are NEVER a dual-state resident of two states AT THE SAME TIME. The term "dual state resident" is misleading. It should be "part year resident of 2 or more states." You cannot claim residency in two states simultaneously.
One test: If you are a part year resident of two states, and you have work income, do you file a tax return in each state as a part year resident? (Not every state requires a tax return to be filed, but many do). If not, then you are not a "dual state resident."