wrong question.
the law says the tackled player must do one of three things (after being released by the tackler yadda yadda yadda).
However, tackled players are never pinged for not doing these things UNLESS an opponent is trying to play the ball.
So why is a tackle close to the line any different from a midfield tackle?
THAT's the question.
If no one is trying to play the ball they are not preventing anyone from doing anything. If we blew for that there would never be any rugby. It's not material. Similar to players being offside, but not actually interfering with play, yes we could penalise them for being offside, but the game wouldn't benefit from it.
Regarding field position, you could say one is match affecting (a potential score is involved) and one isn't.
This is no different to a deliberate knock on in the red zone, versus a deliberate knock on at the other end of the field. One could almost certainly affect the score, the other is highly unlikely to affect the score. So field position does affect decision making in some circumstances.
In the OP diving on the player near the goal line prevented a probably try.
Diving on the player at the half way line wouldn't, so penalty only, rather than penalty try and yellow card.
You have to remember that the laws are not black and white (much as coaches would like them to be when it benefits them), there are a lot of grey areas that give the referee a wide latitude to facilitate a game of rugby and allow a better game. This is the difference between rugby and many other sports. Safety, Enjoyment, Law....in that order.