Let $\mathcal{X, Y}$ be perfect Polish spaces.
Define $\Sigma_1^0$ sets to be open sets, and for $\xi>1$, $\Sigma_\xi^0$ sets to be sets of the form $\bigcup_{n=1}^\infty P_n^c$ where $P_n$ is a $\Sigma_{\xi_n}^0$ set with $\xi_n<\xi$.
For a countable ordinal $\xi$ say that $f:\mathcal{X}\to\mathcal{Y}$ is $\Sigma_\xi^0$-measurable iff $f^{-1}(N)$ is a $\Sigma_\xi^0$ set for any basic open $N\subseteq\mathcal{Y}$.
It's known that there always exists a Borel isomorphism $f:\mathcal{X}\to \mathcal{Y}$.
Moreover, for any Borel measurable $f:\mathcal{X}\to\mathcal{Y}$ there exists countable ordinal $\xi$ such that $f$ is $\Sigma_\xi^0$-measurable.
If $f:\mathcal{X}\to\mathcal{Y}$ is a Borel isomorphism, take $\xi_1$ to be least ordinal such that $f$ is $\Sigma_{\xi_1}^0$-measurable. Similarly, take $\xi_2$ in the same way for $f^{-1}$. Define the rank of such Borel isomorphism as $\text{rank}(f) = \max(\xi_1, \xi_2)$.
It's known that there always exist a Borel isomorphism $f:\mathcal{X}\to\mathcal{Y}$ such that $\text{rank}(f)\leq \omega+1$.
Can this bound be improved on?
That is, what's the least ordinal $\xi$ such that for any two perfect Polish spaces there exists a Borel isomorphism of rank $\leq \xi$.