It is known that whenever we have a continuous, surjective map $f\colon X\to Y$ between compact metrisable spaces, there is a Borel (even Baire class $1$) section $g\colon Y\to X$ (so that $f\circ g=\textrm{id}_Y$) (cf. for example the exercise 24.20 in Kechris's Classical Descriptive Set Theory).
Can this result be generalized to spaces that are not necessarily metrisable? For example, if $X,Y$ were $2^{\omega_1}$ or some other $2^\kappa$?