That said, perhaps the scene was filmed differently a few times with the identity of the deceased individual changed each time to ensure that the actors didn’t know with absolute certainty who was dying in Endgame’s climactic conflict.
No doubt it was hard to for Avengers: Endgame directors Joe and Anthony Russo to hide full context for everything that was shot.
For instance, with Tony Stark’s funeral, there’s really no way to make that scene play out as if it were a different event.