Let $(X_n)_{n \geq 0}$ be an i.i.d. sequence of $\{0,1\}$-valued random variables $X_n \sim \mathrm{Bernoulli}(\frac{1}{2})$, i.e. a sequence of independent tosses of a fair coin.
Does there exist a (non-random) Borel-measurable function $h \colon \{0,1\}^{\mathbb{Z}_{\geq 0}} \to \mathbb{Z}_{\geq 0}$ such that $$ \mathbb{P}(\exists\,\text{infinitely many } k \geq 0 \text{ s.t. }h((X_{k+n})_{n \geq 0})=k ) = 1 \, \text{?} $$