I have a question about the following Burgers' equation.
$u_t + (\frac12u^2)_x = 0 $ with $u(x,0) = \sin(x)$ on $[0,2\pi]$ and periodic boundary conditions.
When I studied this equation numerically, I notice that once the shock forms, the shock stays still in the same place, yet the magnitude of the function decreases as time passes. That is, the initial function $\sin(x)$ ranges from $-1$ to $1$, but as time passes, the magnitude of the maximum and minimum of the function decays.
Is this what is supposed to happen analytically?


No, analytically that is not what happens. The equation in your question is discussed in Miller's Applied Asymptotic Analysis, and I quote from the middle of p. 78:
It turns out that it's possible to modify the equation in such a way that the shocks are stable (though still move as time progresses, if I recall correctly) by adding a diffusion term. I definitely recommend reading section 3.6 of Miller's book.