As always we may identify $\omega^{<\omega}$ with $\omega$. Note that the set $$\mathcal{A}=\{T\subseteq \omega^{<\omega}: T \text{ is a tree that has a branch}\}\subseteq (\omega^{<\omega})^{\omega}$$ is $\Sigma_1^1$ but is not $\Pi^1_1$ . We show that there exists a closed set $C\subseteq (\omega^{<\omega})^{\omega}\times \omega^{\omega}$ such that $\pi_0(C)=\mathcal{A}$ and for all $y\in \pi_0(C)$ the preimage $\pi_0^{-1}(y)$ will be uncountable (by $\pi_0$ I mean the projection on the first coordinate). This will suffice to prove your result since $C$ is a Polish space and $\pi_0\restriction C$ will be the desired function.
Note that the set of trees is a closed subset of $(\omega^{<\omega})^{\omega}$
$$
C=\{ (T,f): T\text{ is a tree }\wedge\forall n\in \omega \exists \sigma\in T\,(|\sigma|= n \wedge \forall m<n f(m)\geq \sigma(m))\}
$$
That is, $C$ is the pairs $(T,f)$ which consists of a tree $T$and $f$ is a branch in the tree
$$T^+=\{\tau\in \omega^{<\omega}: \exists \sigma \in T\, |\sigma|= |\tau| \wedge \forall n<|\sigma|(\tau(n)\geq \sigma(n)\}
$$
The set $C$ is closed as you can bound the search for $\sigma$. Observe that $T$ is well founded if and only if $T^+$ is well founded and if $T^+$ has a branch then it has uncountably many branches. So $\pi_0(C)=\mathcal{A}$ and for all $T\in \pi_0(C)$ you have that $\pi_0^{-1}(T)=[T^+]$.
If by countable you mean in bijection with the naturals and not $\leq|\omega|$ then you can pick your favorite countable closed $B\subseteq \omega^\omega$, for example $B=\{f: \forall n\geq 1\, f(n)=0\}$, and $B\cup C$ will be the desired set.