Double Taxed by CA and AZ on Capital Gain

Hi. My issue is I am being taxed twice on source income (capital gain on sale of personal home) from AZ since I am now resident of CA. I sold my AZ home in June 2023; however, I became a resident of CA end of May (had to move before I closed on home).  So CA is taxing me on all my source income including the home sale since I am a resident of CA now (and as of the final closing/transaction date in June 2023), and AZ is also taxing me on the capital gain since the home was in AZ. Should I file AZ forms 301 and 309 to get a tax credit from AZ for the double taxation amount, or do I need to file CA Schedule S?  I am getting such conflicting info from researching the subject. It is not a big capital gain, but I just want to file the right form.