Married couple with one person moving to another state mid-year

Asking for a family member:  this married  couple owns a home in Maryland and have always filed jointly as Maryland residents. In Sept 2022, due to medical issues, one of them moved to independent living in California and the spouse still (currently) resides in their shared owned home in Maryland. The one who is in independent living pays rent in California and still pays the mortgage in Maryland (this one's income is much higher due to more than one retirement pension & social security - the other spouse would not technically cover mortgage with their SS income) Both are retired and only have retirement income (SS retirement, military retirement & federal employee retirement - not sure if the specifics matters?). Taxes were only withheld for Maryland for both people for 2022. Can they file 2022 taxes jointly as just Maryland residents, or must they file separate taxes and have the one in CA say they became a CA resident in September, even though they still own a home in MD? Thanks!