Sign On Bonus Taxed by Two States

In 2022, I was a resident of CA until 9/1/2022 when I moved to NC for a new job.  The new job required training at the offices in MD for two weeks of which 3 days required work in the VA office. (Note - the two week salary is assigned to MD per the W-2).  I received a sign on bonus prior to 9/1/2022 (while in CA prior to training in MD/VA).  The W-2 of my new position in NC has the sign on bonus taxed in CA and VA. Do I really have to pay tax on the bonus to VA?  Thanks so much for any insight!