A mathematical question from an article

Hi all
I see an equation in one of the articles that is a little strange to me.
Nikolay Hristov.pdf (924.9 KB)

One of the equations of this paper is as follows:

Derived wrt. L:

The derivative of the second expression is as follows:

image

My question is whether this derivation is correct? Why is it not derived from the second L:

image
Thank you in advance for your help

My guess is that they integrated this out.