Conservation laws are established in general relativity if there is a Killing vector $K_a$, where for some values of the index $a$ there may be zero entries, so that for a momentum vector $p^a$ $=~(p_t,~{\vec p})$ the inner product $p^aK_a~=~constant$. The Killing vector is then an isometry such that a vector along a parallel translation defines a conserved quantity relative to the Killing vector. That conserved quantities are variables conjugate to the components of the Killing vector. How to find Killing vectors is somewhat involved, but as a rule, if a metric coefficient $g_{ab}~=~g_{ab}(t)$ then there is no Killing vector with a component along that coordinate direction. The general line element for a cosmology involves a scale factor $a~=~a(t)$,
$$
ds^2~=~-dt^2~+~a^2(t)(dr^2~+~r^2d\Omega^2)
$$
which is a pretty good clue that this spacetime has not fundamental conservation of energy. There is no timelike directed part of a Killing vector, therefore conservation of the energy conjugate variable can’t be established fundamentally.
So is energy absolutely not conserved in our universe? The answer to this depends upon upon some other conditions; for it does turn out that our universe may have a unique condition which recovers energy conservation.. The FLRW equation for the scale parameter $a~=~a(t)$ is
$$
\left(\frac{\dot a}{a}\right)^2~=~8\pi G\rho/3~–~\frac{k}{a^2}
$$
where ${\dot a}/a~=~H$, the Hubble parameter, and flatness means $k~=~0$, spherical geometry is $k~=~1$ and hyperbolic geometry is $k~=~-1$. There is an equation of state for the mass-energy and pressure in the spacetime
$$
\frac{d(\rho a^3)}{dt}~+~p\frac{da^3}{dt}~=~0
$$
I will consider an approximate de Sitter spacetime, which has $\rho~=~constant$, and is identified in ways not entirely understood with the quantum field vacuum. The FLRW equation for $k~=~0$ is then
$$
\frac{da}{dt}~=~\sqrt{8\pi G\rho/3}~a
$$
which has the solution $a~=~\sqrt{3/8\pi G\rho}~exp(\sqrt{8\pi G\rho /3}t)$. Using the Einstein field equation we then have that the stress energy is $T^{00}~=~8\pi G\rho~=~\Lambda$, which is the cosmological constant. Returning the first equation, the FLRW equation, we then see that $H^2~=\Lambda/3$. The dynamical equation for the dS spacetime with $\rho~=~const$ gives
$$
\rho \frac{da^3}{dt} + p \frac{d a^3}{dt} = 0
$$
or $p~=~-\rho$. This is the equation of state for $p~=~w\rho$, and $w~=~-1$. This corresponds to a case where the total energy is zero and the first law of thermodynamics is $dF~=~dE~–~pdV~=~0$ means the energy that is increased in a unit volume of the universe under expansion is compensated for by a negative pressure which removes work from the system. Further $pdV~=~d(NkT)$, and for a constant thermal energy for the vacuum and $Nk~=~S$ the entropy of the universe.
For this particular special case we do have an equation of state which gives a conservation of energy. Another way of seeing this is this spacetime has a time dependent conformal factor $a(t)$, and this metric is conformally equivalent to a flat spacetime, where one can define an ADM mass that is conserved.
Of course the question might be raised whether this pertains to our physical universe. The inflationary period had a huge exponential acceleration, or equivalently a scale factor which grew extremely rapidly. This period should then have had conservation of energy. As for the time period before then, who knows? After the reheating period the universe became radiation dominated and energy conservation is not immediately apparent. Energy conservation may only then be established in our universe in the very distant future as it approaches an empty de Sitter vacuum state.