I dont want to be vague, but it sort of depends.
You need to start with the undersanding that each flash photograph has two exposure values, one if the flash, and the other is the ambient light in the part of the scene not lit by the flash. It sounds basic but some users dont consider that.
ETTL doesnt change, that is the auto feature of the flash system doesnt change dependent on mode, but the camera does respond differently. Let me explain. In AV and TV mode ( I admit I dont have a clue about P mode but suspect its the same as the other auto modes) when you use the flash in ETTL mode the programming of the camera tries to do most of the work with the camera first. What I mean by that is that in AV mode it tries to use a combination of shutter speed and flash power to keep the flash relatively balanced with the ambient (which we call fill flash). In TV mode it sort of does the same adjusting the aperture and flash power to give you that same balance. The common denominator is that the programming assumes you dont want flash so bright that your background is dark which used to be very common before ETTL.
Once you switch to M the flash still tries to give you the same exposure it did before, but now its getting less help from the camera programming so it appears to be behaving differently. The flash is still trying to get the correct exposure, but the photographer decides by selecting the M setting he wants how much balance the flash and the ambient will have. If you set your Aperture at f16 and shutter speed at 1/200 of a second in an average room the flash will have to pump out full power to illuminate the subject. If you were in that same room in av mode and selected f16, the camera would default to 1/10 of a second trying to balance the ambient to the flash output so the background wouldnt be totally black, but of course that would be below handholdable speed.