  We analyze the velocity anisotropy of stars in real and energy space for a
sample of Milky Way-like galaxies in the TNG50 simulation. We employ different
selection criteria, including spatial, kinematic and metallicity cuts, and make
three halo classes ($\mathcal{A}$-$\mathcal{C}$) which show mild-to-strong
sensitivity to different selections. The above classes cover 48%, 16% and 36%
of halos, respectively. We analyze the $\beta$ radial profiles and divide them
into either monotonically increasing radial profiles or ones with peaks and
troughs. We demonstrate that halos with monotonically increasing $\beta$
profiles are mostly from class $\mathcal{A}$, whilst those with peaks/troughs
are part of classes $\mathcal{B}$-$\mathcal{C}$. This means that care must be
taken as the observationally reported peaks/troughs might be a consequence of
different selection criteria. We infer the anisotropy parameter $\beta$ energy
space and compare that against the $\beta$ radial profile. It is seen that 65%
of halos with very mild sensitivity to different selections in real space, are
those for which the $\beta$ radial and energy profiles are closely related.
Consequently, we propose that comparing the $\beta$ radial and energy profiles
might be a novel way to examine the sensitivity to different selection criteria
and thus examining the robustness of the anisotropy parameter in tracing
stellar kinematics. We compare simulated $\beta$ radial profiles against
various observations and demonstrate that, in most cases, the model diversity
is comparable with the error bars from different observations, meaning that the
TNG50 models are in good overall agreement with observations.
