This is a somewhat technical question so please bear with me. However, apparently my understanding leads to a contradiction, so I must be missing something basic, and I would be grateful to gain better understanding and clarify the situation.
Consider the real semisimple Lie group $G = SO(2p,2q+1)$ say with $1<p\le q$. Data about this group can be found on p. 699 of Knapp's book. The absolute root system has type $B_{p+q}$ with absolute rank $n = p+q$. A maximal compact subgroup is $K= SO(2p)\times SO(2q+1)$. Thus $K$ has type $D_p \times B_q$ as a compact semisimple Lie group.
Take $T = (S_1)^n$ for maximal torus, consisting of copies of $S^1$ arranged in the "obvious" way as $2 \times 2$ blocks along the diagonal. The Lie algebra $\mathfrak{h} = \mathrm{Lie}(T)$ is a maximally compact Cartan subalgebra of $\mathfrak{g} = \mathrm{Lie}(G)$.
The associated Vogan diagram is that of $B_{n} = B_{p+q}$ with a trivial automorphism. All simple roots are imaginary (i.e. take imaginary values on $\mathfrak{h}$). There is a single "painted" root $\alpha_{p} = e_{p} - e_{p+1}$. This means that $\alpha_p$ is non-compact, while all other simple roots $\alpha_i$ with $i \neq p$ are compact. This makes sense - after all, the simple roots $\alpha_{p+1},\ldots,\alpha_{p+q}$ are a simple system for the $B_q$ factor. However, the $D_p$ factor is "missing" its simple root $e_{p-1} + e_{p}$, which is listed in Knapp under "simple roots for $\mathfrak{l} = \mathrm{Lie}(K)$".
I now come to my question. It has to do with what happens precisely when the non-compact ("painted") root $\alpha_p$ is being restricted to $T$ for the adjoint representation of $G$.
One the one hand, $\alpha_{p|T}$ is the sum of the algebraically integral form $e_p$ on the $D_p$ factor, with the negative root $-e_{p+1} = -(e_{p+1} - e_{p+2}) - \cdots - (e_{p+q-1} - e_{p+q}) - e_{p+q}$ on the $B_{q}$ factor. So, if we replace $G$ with its adjoint $\mathrm{Ad}(G) \le \mathrm{GL}(\mathfrak{g})$ and so $T$ with its image under the adjoint $\mathrm{Ad}(T) \le \mathrm{GL}(\mathfrak{g})$, the integral form $e_p$ is not analytically integral (regarded on the $D_p$ factor, since for an adjoint semisimple compact Lie group, the set of analytically integral forms coincides with $\mathbb{Z}$-span of roots, but $e_p$ does not belong to the $\mathbb{Z}$-span of roots w.r.t. $D_p$).
On the other hand, the restriction of the adjoint representation $\mathrm{Ad} : G \to \mathrm{GL}(\mathfrak{g})$ to the maximal torus $T$ still "remembers" the non-compact roots, so these should give rise to analytically integral forms on $\mathfrak{h} = \mathrm{Lie}(T)$. However, as noted above, $\alpha_p$ is not analytically integral.
I realize something must be flawed in the above picture. Presumably, the same confusion can arise more generally (not just with $SO(2p,2q+1)$ of course), but let's stick to this special case.
Thanks.
I think I figured this out:
The group $G = \mathrm{SO}(2p,2q+1)$ is adjoint (i.e. has trivial center), so that $\mathrm{Ad}(G) = G$.
Its maximal compact subgroup $K = \mathrm{SO}(2p) \times \mathrm{SO}(2q+1)$ has non-trivial center.
Therefore the image of $K$ with respect to adjoint representation $\mathrm{Ad} : G \to \mathrm{GL}(\mathfrak{g})$ satisfies $\mathrm{Ad}(K) = K$ and is not adjoint.
Because of this, we should not expect the analytic form $\alpha_{p|T}$ to be a $\mathbb{Z}$-combination of roots.
This resolves the contradiction.