$\newcommand{\d}{\,\mathrm{d}}$I can tell you from long personal experience that Desmos is really really really really bad at doing trigonometric integrals over large domains. For example, we all know: $$\int_0^\infty\frac{\sin x}{x}\,\mathrm{d}x=\frac{\pi}{2}$$But:

If you play around with the size of the upper bound, Desmos' answer wavers between $0$ and $3$, roughly, and the differences don't at all converge. For reference, $\pi/2\approx1.570796$.
Let's try some others. For example: $$\int_0^\infty\sin(x^2)\d x=\frac{1}{2}\sqrt{\frac{\pi}{2}}$$
Yet:

Which is atrocious.
I could give more examples, but I hope I've made my point: if your integrand features trigonometric quantities that don't really rapidly decay, don't use Desmos, use Wolfram or some other computer.
As commented, the period of your $f$ is not $\pi$ but rather $2\pi$. This breaks the formula, so we need another method.
How else can we compute this integral? Complex analysis!
Rewrite the integrand: $$\frac{\sin x}{x}\left(1-\frac{1}{2+\cos x}\right)$$So that our integral is just: $$\pi-\int_{-\infty}^\infty\frac{\sin x}{x}(2+\cos x)^{-1}\d x=\pi-2\alpha\cdot\Im\int_{-\infty}^\infty\frac{1}{\alpha+\beta\cdot e^{-ix}}\cdot\frac{\d x}{x}$$Where: $$\alpha=\frac{\sqrt{3}+1}{2},\,\beta=\frac{\sqrt{3}-1}{2}$$
If we take the contours $-R\to-1/R$ (straight line), $-1/R\to1/R$ (semicircle of radius $1/R$), $1/R\to R$ (straight line) and then $R\to-R$ (semicircle of size $R$) for large $R$ which are uniformly bounded away from the moduli of the poles (see below), $n$ an integer, and limit as $R\to+\infty$, our remaining integral shall equal: $$\Im\left[2\pi i\cdot\sum\operatorname{Res}_{\Im z>0}+\frac{\pi i}{\alpha+\beta}\right]=\frac{\pi}{\alpha+\beta}+2\pi\cdot\Re\sum\operatorname{Res}_{\Im z>0}$$
Since it's not too hard to see that the integrals over the larger semicircles vanish as $R\to\infty$, and the integrals smaller semicircles near zero can be found with the half-residue principle. This would yield a genuine evaluation of the integral of the imaginary part (which converges) and a principal value (of zero) for the non-convergent real part. I here have only focused on the desired imaginary part.
When does our integrand have poles in the upper half plane? If $\alpha+\beta\cdot e^{-i\sigma+\tau}=0$ for some $z=\sigma+i\tau$ then we know $e^{-i\sigma+\tau}=-\frac{\alpha}{\beta}=-2\alpha^2$ which is purely real. Hence $\sigma$ must $\pi n$ for some integer $n$, and then $(-1)^n\cdot e^{\tau}=-2\alpha^2<0$ shows $n$ is necessarily an odd integer. Then $\tau=\ln(2\alpha^2)$ is forced: let's define $\zeta:=\ln(2\alpha^2)$. The poles are precisely $z=\pi(2n+1)+i\zeta$ for integer $n$. The residues are $\frac{1}{z}\cdot\frac{1}{-i\beta e^{-iz}}=\frac{i}{-2\alpha^2\beta}\cdot\frac{1}{\pi(2n+1)+i\zeta}=-2i\beta\cdot\frac{\pi(2n+1)-i\zeta}{\zeta^2+\pi^2(2n+1)^2}$. Thus the integral is: $$\frac{\pi}{\sqrt{3}}-4\pi\beta\zeta\cdot\sum_{n=-\infty}^\infty\frac{1}{\zeta^2+\pi^2(2n+1)^2}$$The other part of the sum, with summands $-2\beta i\cdot\frac{\pi(2n+1)}{\zeta^2+\pi^2(2n+1)}$, I have ignored since the residue sums arise symmetrically, and these summands have (almost) an odd symmetry in $n$ and the sums vanish. This confirms the clear fact that the principal value of the non-convergent real part is zero.
Our final answer should then be: $$\int_{-\infty}^\infty\frac{\sin x}{x}\cdot\frac{1+\cos x}{2+\cos x}\d x=4\pi\zeta\sum_{n=-\infty}^\infty\frac{1}{\zeta^2+\pi^2(2n+1)^2}-\frac{\pi}{\sqrt{3}}=\frac{\pi}{\sqrt{3}}$$
This matches the Wolfram Alpha numerical data. The final series computation was done using well known formulae: $$\forall a,b\in\Bbb R\setminus\{0\},\quad\quad\sum_{n=-\infty}^\infty\frac{1}{a^2+b^2(2n+1)^2}=\frac{\pi}{2ab}\tanh\left(\frac{\pi a}{2b}\right)$$Which can itself be derived from complex analysis. There is a master theorem:
Let $f:\Bbb C\to\hat{\Bbb C}$ be a meromorphic function with a finite set of poles $P$, none of which are integers, such that $\lim_{z\to\infty}zf(z)=0$. Then: $$\lim_{N\to\infty}\sum_{|n|\le N}f(n)=-\pi\sum_{p\in P}\operatorname{Res}_{s=p}(\cot(\pi s)f(s))$$
This can be strengthened a little bit. You need to apply it to the meromorphic map $s\mapsto(a^2+b^2(2s+1)^2)^{-1}$, with poles: $$s=-\frac{1}{2}\pm\frac{a}{2b}i$$