Calorie is a unit of heat energy. The energetic yield of a gram of protein can be described by its ability to be burned to heat a gram of water, say. This is the definition of a calorie.
That energy is still constant, there is not some magical world where protein suddenly has more energy density in a human body than it did when it was burned in a calorimeter. That would break the laws of thermodynamics.
You can question whether there is metabolic advantage to consumption of certain types of food (that is, does the human body leverage certain foods in a metabolically more efficient fashion than others, such that consumption of the same calories but in a different composition results in differential weight gain or loss — this actually is studied in nutritional studies). But the laws of thermodynamics still apply there. The first that energy is conserved (kcal is fine for describing this as an upper bound) and the second concerning the free energy of a chemical system to perform “work”, which isn’t heating a gram of water (though it also sort of is, were warm blooded creatures) but rather describing the capacity of the substance to ultimately contribute to chemical processes in a cell, such as the generation or consumption of ATP.
And yes, every gram of food has a specific amount it can contribute to those chemical processes, and it’s tied to the total amount of energy in a gram of that material, which is conveniently calculated in a calorimeter.