Let $K$ be a (Hausdorff) scattered topological space and for each ordinal $\alpha$ denote by $K^{(\alpha)}$ the $\alpha$th derivative of $K$ by the Cantor-Bendixson derivation (i.e., define transfinitely: $K^{(0)} = K$; for each ordinal $\alpha$, let $K^{(\alpha+1)}$ be the set of nonisolated points in $K^{(\alpha)}$ when $K^{(\alpha)}$ is equipped with the subspace topology); for $\alpha$ a limit ordinal, set $K^{(\alpha)}= \bigcap_{\beta<\alpha}K^{(\beta)}$).
Also, set $\xi(X) = inf\{ \alpha : X^{(\alpha)} = 0 \}$
I am trying to prove the following claim:
Claim: If $X$ is a Hausdorff Lindelöf scattered space, then, $\xi(X)$ is a successor ordinal.
Proof: Suppose that $\xi(X)$ is a limit ordinal. Then the set $\{ X \setminus X^{(\alpha)} : \alpha < \xi(X) \}$ is an open cover of $X$. $X$ is Lindelöf, so there is a countable subcover $\{ X \setminus X^{(\alpha_n)} : n \in \mathbb N, \alpha_n < \xi(X) \}$. We can also assume that for each $n \in \mathbb N$, $\alpha_n < \alpha_{n+1}$. Note that For each $n \in \mathbb N$, $X^{(\alpha_n)}$ is closed. Also, for each $n \in \mathbb N$, $X^{(\alpha_{n+1})} \subset X^{(\alpha_n)}$ and $\bigcap X^{(\alpha_n)} = \emptyset$. There exists no ordinal $\beta > 0$ such that $\xi(X^{(\alpha_n)}) \geq \beta$ for each $n \in \mathbb N$ because if there was, we woud get $\xi(\bigcap X^{(\alpha_n)}) \geq \beta$ which would imply $\bigcap X^{(\alpha_n)} \neq \emptyset$. So we can assume that for each $n \in \mathbb N$, $\xi(X^{(\alpha_n)}) > \xi(X^{(\alpha_{n+1})})$. So, the sequence $\xi(X^{(\alpha_n)})$ is a strictly decreasing sequence of ordinals. This implies that it has to be finite and that there is a finite $n \in \mathbb N$, such that $X = \bigcup_{i=1}^n (X \setminus X^{(\alpha_i)}) $. But this implies that $\xi(X) = \xi(X \setminus X^{(\alpha_n)}) < \xi(X)$ which is a contradiction. We conclude that $\xi(X)$ can only be a successor ordinal.
Your claim does not hold. In fact any subset $X$ of the Baire space with $\xi(X)$ equal to a limit countable ordinal would do as a counterexample. Here is a particular simple counterexample.
Consider the subspace $S$ of the Baire space $\omega^\omega$ defined by $$S=\{k^{\smallfrown} x \mid k\in\omega \text{ and $x\in 2^\omega$ with $\{i\mid x(i)=1\}\leq k$}\}$$ You can verify that $S$ is closed.
Since the Baire space is second countable (i.e. admits a countable basis of open sets), $S$ is second countable too. Since a second countable space is Lindelöf, $S$ is Lindelöf.
Now you can check that for all $n\in\omega$ $$S^{(n)}=\{k^{\smallfrown}x\mid n\leq k\text{ and $x\in 2^\omega$ with $\{i\mid x(i)=1\}\leq k-n$}\}.$$ It follows that $S^{(\omega)}=\emptyset$ and so $\xi(S)=\omega$.