I don't know the precise physics of this, but it's an expected phenomenon, especially on heavier strings.
When you first strike the string hard, the amount of displacement in the vibration from 'perfectly straight' stretches the string, so in effect raises its tension & therefore pitch.
As it gets quieter, that displacement becomes less, so the pitch drops slightly, back to 'nominal'.
If you strike the string more softly, or further back towards the bridge, this will happen less.
This is aside from anything you may accidentally be doing to the guitar as this happens, perhaps resting on the rear of the body whilst holding the neck, etc. or that as you progress through the strings, if all needed to be raised in pitch, by the time you get to the last string the neck will have pulled forwards slightly, making the earlier ones flat.