When I render as animation the render doesn’t work, the window appears but there’s no image or any statistics of the render. What I find weird is that I can render a still image perfectly fine and I rendered two other render layers in the same scene fine. This render layer is just the background as the other two had it set as transparent.
It seems that I fixed the problem, but it was a weird solution:
I changed the output path in the Output Properties tab from "tmp" to another folder, although it worked before in "tmp" for the other layers, and there was a node in the Composite window for saving to a specific folder.