I always let the different style 'carry' their old rank. But testing going forward would have to meet our requirements. It can make for a long time before moving forward in rank.
This is what I've mostly seen, too. E.g., if someone comes in with a black belt, they normally keep wearing it, and if they were, e.g., 3rd kyu then normally next test will be 2nd, etc. But any future tests are to the new teacher's requirements, so if those are significantly different it can mean a big time lag before the next test.
But I think those kinds of things are kind of up to the discretion of the teacher and not always a standardised official policy of an organisation.
It might also depend if the new dojo is part of a completely different organisation or just a different branch/style/etc.
I'd probably try to mentally prepare myself to start from the beginning just in case, in actual training as well as 'officially' - you can always be pleasantly surprised if that's not the case. I expect the actual training part may be more difficult than the official rank, though. There may be things you've learned that you'll need to tuck away as they're not what's needed here (you will eventually decide for yourself if you actually want to unlearn them or just let them be dormant for a while or incorporate them), things that the new dojo considers basic that you've never learned, etc.