Is the gas velocity of a jet engine relative to the engine speed or is it absolute?
The answer is NO, but it is important to understand why. I will explain the conditions, and answer your questions at the end one by one.

First point you are never testing the same engine:


Aircraft manufacturer usually introduces its inlet and its nozzle so both are not usually the same in a test and in the real conditions. (that will mean is partially installed)


You are not including the general effect of the A/C aerodynamics.
You are not including the air bleeding and oil and fuel pump (also, a partially installed engine)



Essentially you are asking about the effects between installed and uninstalled effects on an engine.

Answering your qeustions:

If we measure the absolute inlet and outlet velocities are the same as before or only the relative ones(aircraft velocity+gas velocity) are the same?


This question is not clear as an engine will have different outlet velocities (fan, main cowl...). Taking care about the right reference systems the speed will be of the same order but affected by my previous argument about installed/uninstalled engines


In the case of the engine attached to the aircraft all the fuel energy that can be used is transformed into changes of the kinetic energy of both the aircraft and the air passing through the engine.Right?


Now, some part is used for bleed air, electric systems, fuel and oil pumps. Not all energy is used to cover the drag of the airplane.


In the first case of the test, the kinetic energy of the engine isn't changing, so all the used fuel energy is changing the gas kinetic energy, so in this case the difference in the kinetic energy of the gas is greater. Does this makes sense since we talk for the same operation point?


Given that you establish the reference system fixed to the engine, you will as well not have a difference in speed produced by the engine. Actually you should used that reference system.