DC/Maryland/Virginia reciprocity: Do I need form 763-S or can I just file as nonresident?

Two weeks before 2023 I bought a house in MD and left VA. The entire 2023 I lived in MD. So, my 2023 W2 has only VA withholding as I thought updating my address with my Agency (in DC) would cover all forms. Naturally, MD says I owe them an enormous amount of money. Can I just file for VA as a non-resident, then file for MD as a full resident, and be done with it? It says VA would give me back all my withholdings which would cover what I owe MD. Or should I file only for MD and pay the money owed, then file form 763-S along with my completed MD return and wait for a refund from VA? Does it matter? I called the IRS and they say they don't care what I do as it doesn't affect them.