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.
music.stackexchange.com/users/12556/Tetsujin
Yes, this is expected, for the reason Tetsujin states -- that a string vibrating at a higher amplitude is under higher tension.
Of course this raises the question - do you tune the guitar so that the attack is in tune with the other instruments, or the decay?
The answer may depend on what kind of part the guitar is playing, and the mix of the track.
In many cases it will be too small a factor to matter much, but occasionally being mindful of the pitch envelope of the decaying string will help you improve your final recording a little.
music.stackexchange.com/users/18896/topo Reinstate Monica
It's always going to be the case, when you play the string too hard.
Think about it - the string is stretched slightly as you pluck it (more when you pluck harder), so the shown pitch is going to be higher.
Once it settles down and is sounding normally, it's fine.
Way round is to not pluck too hard - the device should still 'hear' it, but in any case, wait a second to establish what the tuner has decided the note is.
Then tune accordingly.
On a personal note, I'm increasingly dismayed that so many players rely so heavily on tuners that soon they may have lost any other means of tuning!!
Wait till the battery goes flat!
music.stackexchange.com/users/2808/Tim
I was taught to tune from a higher frequency down to the correct value, instead of up from a low value.
There will likely be some difference in tension in the string, somewhere between the tuning mechanism to the nut after you stop turning the tuning peg.
I assume the friction of the strings on the nut causes this.
It might not reveal itself directly, but when the tension evens itself out over the entire string later, the sounding part of the string can go slightly out of tune.
music.stackexchange.com/users/27921/MeanGreen
Most people find it easier to identify "in tune" when coming up from below.
I dunno why; one of those neuroacoustic things.
There's the added advantage that you reduce the risk of snapping a string from overtensioning.
And equally important: tuning from below means there's no backlash or relaxation effects.
If you tune from above, you are releasing tension but the string may well take a little time to fully release - hence drifting out of tune.
And when tuning from below, the machine head (gears in the tuning mech) is always fully "non-backlashed" as well.
music.stackexchange.com/users/6275/Carl Witthoft
What I usually do: When I tune a guitar I pull on the string to stretch it or to control that it is correct fixed.
Yes, and as I mentioned in my comment: Maybe by tuning another string the neck gets slightly bowed and the string tension weakened.
music.stackexchange.com/users/56219/Albrecht Hügli
If I tune a guitar typically I see that I strike the string and the tuner records a certain value, e.g. dead on E.  However often (maybe not always - but I can't say for sure) a few moments later the tuner shows that the string is tuned slightly below E.  What causes this?  Surely as a string loses energy it doesn't drop in pitch?
guitar tuning - note shifts after striking it
music.stackexchange.com
<guitar><tuning><pitch>
music.stackexchange.com/questions/92715
music.stackexchange.com/users/56699/user307927
When tuning a guitar 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. 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
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. As it gets quieter, that displacement becomes less, so the pitch drops slightly, back to 'nominal' 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.