The obvious answer to this question would be that you are no longer supplying fuel to cause combustion and the frictional losses slows down the rotating and reciprocating parts of engine causing engine rpm to drop.
But I guess it has more to do with the process involved in engine braking than frictional losses. Engine braking technically refers to the process of passively slowing down the vehicle using the engine itself by putting the vehicle in gear and letting go off the accelerator pedal. In gasoline engines this is done by closing the throttle valve while in diesels its done by closing a valve in the exhaust system and in trucks Jake brakes are used.
But doesn't the same braking process happen (not referring to the braking of vehicle rather referring to slowing down of the engine) even if you don't put the vehicle in gear i.e say when you put it in neutral or disengage the clutch and let go off accelerator pedal? Now it's just that engine components themselves are only slowing down instead of slowing down the whole vehicle as its not hooked to the transmission.
So my question is "Is it the engine braking (or the process involved in it) along with frictional losses that causes the rpm to drop or is it just due to frictional loss alone? (I don't think there is that much frictional losses in engine to cause such a quick drop in rpm. If there was so much frictional loss that would be a poorly designed engine).