Hello, I think I have found a bug as shown below;
Have a nice day.
I'd recommend you to look the way Mattia Scomparin varied the Einstein--Hilbert action in the document https://cadabra.science/notebooks/einstein_equations.html.