I'm aware this post is two years old and I'm terribly sorry for the necro, but time and time again I see people say that hitboxes in TF2 "lag behind" or point to other inaccuracies, and this is a thread that I've seen posted a few times as well.
What I want to make absolutely clear is that the OP's screenshots are virtually useless. They do not tell us when they actually took the shot. In TF2, the info that your target died/took damage doesn't reach your client until several ticks later (or frames in case of recorded footage), which can be more or less depending on your ping. This doesn't mean that your crosshair wasn't perfectly on point in the moment that you took the shot. In OP's case, their screenshots appear to be back to back, one frame to the next, so the first screenshot is without a doubt NOT the moment they actually shot.
On the contrary, the Soldier in those screenshots appears to have a blood decal on his face (it's already visibly poking out from below his cap on the first screenshot) which is likely to have been caused by OP's Sniper Rifle shot. Though of course that can't be proven.
I have a crosshair changer script that cycles between cyan, magenta and green on my crosshair whenever I press a movement key. Recently for my Sniper config I also bound mouse1 to +attack as well as turning my crosshair black, meaning my crosshair turns black on my screen the instant my game client registers my input. I've gone and recorded a lot of Sniper footage (under normal, non-laggy conditions) and have found that there was not a single time one of my shots hit while my crosshair wasn't on target (there were edge cases where the crosshair isn't quite on the head for a headshot, but you have to keep in mind that the head hitboxes are a lot larger than the visual model: https://i.ytimg.com/vi/WVvUwseSUXQ/maxresdefault.jpg). I have also not seen a single shot that was on-target and created a blood decal yet returned a miss from the server. TF2 by all means appears to have a very good netcode, which shouldn't be surprising given that it's the same engine as CS:GO.
I might make a video of all that footage in the future with an explanation of what's going on but for now, this clip demonstrates what I've been talking about:
https://youtu.be/AhQ4QE-01S4
For the record, when I play on a server with 40 ping, this is the order of events that ensue when I take a successful headshot (footage recorded at 60 fps):
First frame after taking the shot: The crosshair turns black, meaning my (local) game registered my input.
Second frame after taking the shot: Blood decal appears on the model.
Then, anywhere between the third and seventh frame (no idea why this is inconsistent but it's probably to do with server load when sending this info to each client, or my connection being unstable): On-hit particles spawn (CRITICAL HIT!!! message and blood particles), and shortly after that the damage number appears (either on the same frame or one frame later).
It's worth noting that until February 14 of 2017, there was a bug in TF2 that could cause hitboxes to be misaligned as demonstrated here:
https://youtu.be/tfl8TYQ1pbE
So any complaint/video footage made before that time could be perfectly valid in saying that there were issues with hitboxes.