Example 12 Given $f(\theta)=\sin ^{2} \theta+\sin ^{2}(\theta+\alpha)$ $+\sin ^{2}(\theta+\beta)$, where $\alpha, \beta$ are constants satisfying $0 \leqslant \alpha \leqslant \beta \leqslant \pi$. For what values of $\alpha, \beta$ is $f(\theta)$ a constant value?