I received a OSC for DC a state that VA doesn't have reciprocity w/, then a refund for DC in 2022. VA now wants 3k plus interest cause system gave me credit & a refund

DC was marked non resident. And VA has resident. Shouldn't the system have known not to give "credit " if was also processing a refund ?