"When the Civil War was over in the spring of 1865, West Virginians of both the Blue and the Gray returned to their new state. Years later, when West Virginia Union veterans became eligible for federal pensions and Confederate veterans received pensions from their state governments, the West Virginia ex-Confederates again were on the losing side as West Virginia would not recognize their service, and the Commonwealth of Virginia would provide pensions only to its own residents."
https://www.legendsofamerica.com/civil-war-west-virginia/
However, Confederate veterans were granted pensions from the former Confederate state in which they were residing when applying, irrespective of state of service.