I am interested in Lovelock actions in the metric-affine (or Palatini) formalism. It is well-known that the metric version (starting from the Levi-Civita curvature) of the Lovelock lagrangian of order $k$ is a topological term in $2k$ dimensions. For example, the case $k=2$ is the Gauss-Bonnet term.
I have also read in texts on Poincaré gauge gravity (now the connection contains torsion but not non-metricity) that this is also true for torsionful-Lovelock actions.
But some people extrapolate this to the general metric-affine-Lovelock action (with torsion and non-metricity, i.e. a completely general affine connection), but I cannot find the proof anywhere.
Is this true in general? Is it easy to prove?
If it were true:
What does it mean to be "topological" in this particular context? [See Two definitions of topological terms in field theory ] The metric theory can be written as a total derivative; but I think there is no way to do so in the metric-affine case (expanding the connection 2-form using the Cartan's structure equation and trying to extract one of the exterior derivatives), so it must be topological in the other sense. I am confused.