This is unfortunately complicated. The two are not immediately comparable. One issue is the information set, i.e. how you treat first period shocks. See the open ticket at https://git.dynare.org/Dynare/dynare/issues/1045 and Oo_.planner_objective_value
The second issue is the approximation order. See the open ticket at https://git.dynare.org/Dynare/dynare/issues/1680