Messages in iCloud not available as iCloud and iMessage accounts do not match
but they do!
I accidentally deleted an important iMessage conversation. I regularly back up my device to iCloud, so I did a factory reset and downloaded my most recent backup from iCloud. The iMessage conversation returned, but only messages from the last ~1 week were there (as opposed to nearly 8 months). I googled the issue and tried various things, including signing out of iCloud on all devices and restarting them. When I signed back in on my phone, it was no longer syncing to iCloud and I got the error "Messages in iCloud not available as iCloud and iMessage accounts do not match." I doubled checked, and they do match. I'm signed in with the same Apple ID.
Settings -> Messages -> Send & Receive -> name@gmail.com
Settings -> Apple ID -> name@gmail.com
It's the same Apple ID. Please help! I don't know why my phone thinks there are different accounts being used. Thank you.
iPhone 11, iOS 14