Well you can it is by the chain rule : $$\underbrace{(1+1+\cdots+1)}_{x \text{ times}}+\underbrace{(x+x+\cdots+x)}_{1\text{ times}}=x+x=2x$$
More seriously, derivating requires a 'continuous' variable, it makes no sense for integers. I talk about integers because the underbrace $\underbrace{\hphantom{---}}_{n\text{ times}}$ implicitely supposes $n$ is an integer.
However the continuous version of the sum $\sum\limits_{k=0}^n f(k)$ is the integral $\displaystyle \int_0^x f(t)\mathop{dt}$
And by the fundamental theorem of calculs this integral has derivative $f(x)$, so we can somehow give a (very twisted I admit) meaning to the derivative of the underbrace with an $x$ variable.
See Mickael E2's answer in the link you provided yourself https://math.stackexchange.com/a/3643749/39926